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

Adding a timeout for HTTP Ping. #3066

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

utk-12
Copy link
Collaborator

@utk-12 utk-12 commented Mar 14, 2022

Adding HTTP timeout for ping actions.

Alternative approach would be adding a parameter for timeout to the following functions and passing it down the stack and modifying the following functions --> callwithexecutionID, createHttpsClient, createHttpClient, doPost, sendAndReturnHttps, sendAndReturnHttp, callForJsonObjectMap, callForJsonString and all the test classes associated with calling the above mentioned functions.

The benefits for following the approach in this PR over the above approach are as follows :

  • This approach tries to isolate this change for PING action, to avoid using any of the existing HTTP Post function calls used through Azkaban. We would require more extensive testing if we add did decide add the parameter just due to the number of functions it uses.

Note:

  • The ideal approach would be using a HTTP Client builder function for all requests at the doPost level rather than just before the request (the way it is currently) can be added as a TODO and we can then add timeout as a parameter rather than using the default client used currently and just passing the timeout as a parameter the way the functions are defined currently. This should Ideally be used even for adding TLS settings and other relevant HTTP configurations.

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.

None yet

1 participant