diff --git a/Changelog.md b/Changelog.md index aca6db357d..98ba57917a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,9 @@ # FOSSA CLI Changelog +## Unreleased + +- Reports: Increase the timeout when hitting the report generation API endpoint + ## v3.9.12 - `--detect-dynamic`: Fix deb tatic parsing ([#1401](https://github.com/fossas/fossa-cli/pull/1401)). diff --git a/src/Control/Carrier/FossaApiClient/Internal/FossaAPIV1.hs b/src/Control/Carrier/FossaApiClient/Internal/FossaAPIV1.hs index 01c0f90352..db852b73e5 100644 --- a/src/Control/Carrier/FossaApiClient/Internal/FossaAPIV1.hs +++ b/src/Control/Carrier/FossaApiClient/Internal/FossaAPIV1.hs @@ -1183,6 +1183,8 @@ getAttributionJson apiOpts ProjectRevision{..} = fossaReq $ do =: True <> "dependencyInfoOptions[]" =: packageDownloadUrl + -- Large reports can take over a minute to generate, so increase the timeout to 10 minutes + <> responseTimeoutSeconds 600 orgId <- organizationId <$> getOrganization apiOpts response <- req GET (attributionEndpoint baseUrl orgId (Locator "custom" projectName (Just projectRevision)) ReportJson) NoReqBody jsonResponse opts pure (responseBody response) @@ -1197,7 +1199,9 @@ getAttribution apiOpts revision ReportJson = fossaReq $ do jsonValue <- getAttributionJson apiOpts revision pure . decodeUtf8 $ Aeson.encode jsonValue getAttribution apiOpts ProjectRevision{..} format = fossaReq $ do - (baseUrl, opts) <- useApiOpts apiOpts + (baseUrl, baseOpts) <- useApiOpts apiOpts + -- Large reports can take over a minute to generate, so increase the timeout to 10 minutes + let opts = baseOpts <> responseTimeoutSeconds 600 orgId <- organizationId <$> getOrganization apiOpts response <- req GET (attributionEndpoint baseUrl orgId (Locator "custom" projectName (Just projectRevision)) format) NoReqBody bsResponse opts