Smartling / smartling-cli

Smartling-cli is a library and CLI tool for managing Smartling projects. See the project's Wiki for user documentation.
https://github.com/Smartling/smartling-cli/wiki
MIT License
16 stars 12 forks source link

Smartling CLI intermittently fails on file download #69

Closed ppettit-smartling closed 3 months ago

ppettit-smartling commented 3 years ago

User receives the following error intermittently when attempting to pull down localized files:

[ERROR] unable to write file contents into "en.xcloc/Localized Contents/en_th-TH.xliff" -- context deadline exceeded (Client.Timeout or context cancellation while reading body)

On retries file can be downloaded as expected.

Possibly related to IO Go Lang error here: https://golang.org/src/net/http/client.go?s=6511:6572

dimitrystd commented 3 years ago

FAPI takes 140-170 sec to prepare file. The current timeout is 120 sec (https://github.com/Smartling/api-sdk-go/commit/9321c7d1b3e45071578fae05c9875ef5335f5d24). It's time to refactor code and move timeout configuration from SDK to application.

DoD:

junky commented 3 months ago

I removed Timeout from DefaultHTTPClient in api-sdk-go. Upgraded dependencies, including api-sdk-go. It fixes the issue with file download.