-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
fix chain call issue in HTTP JSON input #34325
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
This pull request is now in conflicts. Could you fix it? 🙏
|
This pull request is now in conflicts. Could you fix it? 🙏
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The invariant docs need to be in place, the diff is suggestion to consider.
I have resolved the merge conflicts. let's wait for CI to pass. |
d62b116
to
853965a
Compare
853965a
to
8f640f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after final nits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kush-elastic after having gone through the code and having some internal discussions, this is certainly not a trivial change as it changes the fundamentals of chaining and how it functions. Since httpjson is used in most of our integrations we need to be extra careful in implementing major overhauls, so I kindly ask that the following be done :-
-
Keep the old logic as a fallback that can be easily toggled on/off if the need arises, this is extremely important as it will help us avoid a lot of hassle and user outrage if something breaks-down at scale. This fallback can be removed later after the current code is stable for a while. This change is no-trivial and will possibly require a re-work of the logic. The fallback toggle could be done as part of the config as then it would be very easy to toggle it on/off.
-
Maintain an official documentation detailing the changes to functionality in the current flow and add flow diagrams if necessary.
-
Add more meaningful tests that uses data at scale/large amounts along with tests for the fallback mechanism also.
With these changes, I feel this PR would be ready to be merged.
@kush-elastic is this non-trivial change purely related to Salesforce or are there other integrations that require this new approach to chained calls? Since this PR was originally raised, we've added a new CEL input, which may be a better fit for this use case, and avoid making fundamental changes to httpjson just for the Salesforce integration. While we don't have a perfect approach to switching inputs in an existing integration, we do have some options which we can walk through. We are currently switching inputs on our Office 365 integration. cc @SubhrataK |
@kush-elastic , @SubhrataK , just a heads up here, we have planned efforts to improve and simplify the httpjson input #35432. After some discussion we've decided to hold off on the changes from this PR until the refactoring is complete and reassess the functionality after. |
This pull request is now in conflicts. Could you fix it? 🙏
|
1 similar comment
This pull request is now in conflicts. Could you fix it? 🙏
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
Closing this issue as this was handled in the following meta issue : #35432 |
What does this PR do?
In HTTP JSON input of filebeat, chain calls were being executed and every response was collected first then they were published. So, it was using a lot of memory. Therefore filebeat was exiting without publishing any event.
Checklist
Related issues
Use cases
This PR contains changes to execute the publishing and collection of events concurrently. So, events will not be stored in memory while being collected and published later. Instead, events collection, processing, and publishing will be done simultaneously.