Adding batch to events
A summary of your pull request, including the what change you're making and why.
Testing
Include any additional information about the testing you have completed to ensure your changes behave as expected. For a speedy review, please check any of the tasks you completed below during your testing.
- [ ] Added unit tests for new functionality
- [ ] Tested end-to-end using the local server
- [ ] [Segmenters] Tested in the staging environment
Thanks for raising this PR @Romani-Ramzi . I'll schedule for review
hi @Romani-Ramzi looks like a bunch of CI checks are failing. Can you take a look please? If it's not your code change then try merging in the latest code form the Segment action-destinations main branch.
hi @Romani-Ramzi looks like a bunch of CI checks are failing. Can you take a look please? If it's not your code change then try merging in the latest code form the Segment action-destinations main branch.
Hi @joe-ayoub-segment thats strange, we tested and ran yarn test, everything seemed fine. we updated our fork and seems to be ok.
hi @Romani-Ramzi there's an issue with our CI on Github. It's likely the cause of the red CI checks. The team is on it.
@joe-ayoub-segment is there any update regarding this PR?
hi @Romani-Ramzi I'll review this today. In the meantime - CI checks appear to be failing. Any chance you could take a look please?
@joe-ayoub-segment we updated to fix all test and missing "batch" configuration fields. there are test for batch that we expected to fail, but it did not, we just put a comment "/// TODO" next to them.
In batch test, we though that it should throw error if required field is missing. also in profile action, in single request, address object is excluded if there is no address, but in batch seems to appear with empty object.
please advice.
hi @Romani-Ramzi ,
Sorry, I should have been more clear in my request ;)!
There are 4 Actions being updated so that they can support batching. What I'd like to see evidence of is that each Action can be called with an array of payloads, and that the delivery of those payloads is successful to Optimizely.
Another thing I noticed is that it looks like some of the generated-types.ts files were not updated despite new fields being added. You might need to run the ./bin/run generate:types command and commit the edit.
Lastly we need to see that the CI checks are green. It's possible that just updating the types will fix this, but I can't be sure.
Kind regards, Joe
@joe-ayoub-segment my mistake, I was pushing to different branch, I accidently pushed to different branch name, but its fixed now.
CustomEvent Action end-to-end Test:
SegmentIO side:
Optimizely side:
Got request as array.
nonEcommCustomEvent Action end-to-end Test:
SegmentIO side:
Optimizely side:
Got request as array.
emailEvent Action end-to-end Test:
SegmentIO side:
Optimizely side:
Got request as array.
upsertContact Action end-to-end Test:
SegmentIO side:
Optimizely side:
Got request as array.
hi @Romani-Ramzi this PR has been deployed. Can you please confirm it looks good?