oracle / oci-typescript-sdk

Oracle Cloud Infrastructure SDK for TypeScript and JavaScript
https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/typescriptsdk.htm
Other
71 stars 51 forks source link

changing default retry configuration to OciSdkDefaultRetryConfiguration on getMessages and putMessages queue methods #235

Closed ezequielramos closed 10 months ago

ezequielramos commented 11 months ago

For some reason these two methods are not using the default retry configuration oci.common.OciSdkDefaultRetryConfiguration as the others methods on this same lib.

It appears to has a problem on the node-sshpk library, which is used by http-signature which is used by oci.common.signer.DefaultRequestSigner.signHttpRequest, that only happens the first time that I try to used it. The message error that I got was this:

{
  code: 'ERR_OSSL_DSO_COULD_NOT_LOAD_THE_SHARED_LIBRARY',
  message: 'error:25066067:DSO support routines:dlfcn_load:could not load the shared library',
  requestEndpoint: 'POST https://cell-1.queue.messaging.sa-saopaulo-1.oci.oraclecloud.com/20210201/queues/<queue_id>/messages',
  troubleshootingPage: 'See https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_troubleshooting.htm for help troubleshooting this error, or contact support and provide this full error message.'
}

Debugging it, this was the line that was throwing the error: image

But it was only happening when I used these two methods for first (which drove me crazy for a while). So I saw that the difference of these methods to the others was the default retry configuration being used. When I changed it to be the same as the others, the problem was gone.

oracle-contributor-agreement[bot] commented 11 months ago

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA). The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.