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

channels-1094 #2024

Closed
wants to merge 73 commits into from
Closed

channels-1094 #2024

wants to merge 73 commits into from

Conversation

cogwizzle
Copy link
Contributor

@cogwizzle cogwizzle commented May 3, 2024

refactor: Refactoring the name for dataFeedCache to be
engageDestinationCache. This is because this cache is no longer just intended to be used for DataFeed cache, but is now intended to be used as a more generic cache for the Engage Destination.

A summary of your pull request, including the what change you're making and why.

Testing

The changes should be tested in the PR in integrations.
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.

This change was tested in conjunction with the Channels-1094 branch in integrations. We saw 2000 duplicates prevented during our load test. Additionally we had 624 duplicates that still showed up in Splunk. In prior load test of the same size this number was close to 3000.

  • Added unit tests for new functionality
  • Tested end-to-end using the local server
  • [Segmenters] Tested in the staging environment

engageDestinationCache. This is because this cache is no longer just
intended to be used for DataFeed cache, but is now intended to be used
as a more generic cache for the Engage Destination.
/**
* The features available in the request based on the customer's sourceID;
* `features`, `stats`, `logger`, `dataFeedCache`, and `transactionContext` and `stateContext` are for internal Twilio/Segment use only.
*/
/** Engage internal use only. DO NOT USE. */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Broke this comment apart so that we could get language server support for using each property in the shape of this object.

Comment on lines -42 to +44
/**
* The features available in the request based on the customer's sourceID;
* `features`,`stats`, `logger` , `transactionContext` and `stateContext` are for internal Twilio/Segment use only.
*/
/** Engage internal use only. DO NOT USE. */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Broke this comment apart so that we could get language server support for using each property in the shape of this object.

}
// Check if the response is successful.
if (response.ok) {
const body = await response.text()
Copy link
Member

Choose a reason for hiding this comment

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

I might be wrong but reading response.text() here will close the stream and will fail next time response body is tried to be read (during actual logic of processing response), so you might want to check it and if it's the case you may use response.clone() or pass here the actual value to be cached, instead of response object

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since I'm swapping to use the status code I don't think we need to worry about this.

@joe-ayoub-segment
Copy link
Contributor

hi @cogwizzle @pmunin please let me know when you are done with this so I can review prior to deploy

@cogwizzle cogwizzle requested a review from pmunin May 31, 2024 17:27
pmunin
pmunin previously approved these changes Jun 3, 2024
@cogwizzle cogwizzle marked this pull request as ready for review June 17, 2024 20:50
@cogwizzle cogwizzle requested a review from a team as a code owner June 17, 2024 20:50
@cogwizzle cogwizzle marked this pull request as ready for review July 26, 2024 18:01
pmunin and others added 15 commits August 20, 2024 14:25
* fixing stats bug

* chore: Update "@segment/actions-shared" dependency to version 1.105.1-channels-1200.59

* fix: Initialize EngageLogger and EngageStats in EngageActionPerformer constructor

* fix: common tags

* chore: Update "@segment/actions-shared" dependency to version 1.105.1-channels-1200.62

* clean up dups

* reverting changes that are not relevant to PR from master

* reverting irrelevant changes

* reverting irrelevant changes

---------

Co-authored-by: Philipp Munin <7120440+pmunin@users.noreply.github.com>
@pmunin pmunin mentioned this pull request Aug 26, 2024
3 tasks
@pmunin
Copy link
Member

pmunin commented Sep 24, 2024

Closing towards #2325

@pmunin pmunin closed this Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants