Skip to content

[ENG-8563] Download of QA owncloud file results in 502 Gateway error#467

Closed
mkovalua wants to merge 14 commits intoCenterForOpenScience:post-buff-wormsfrom
mkovalua:fix/ENG--8563
Closed

[ENG-8563] Download of QA owncloud file results in 502 Gateway error#467
mkovalua wants to merge 14 commits intoCenterForOpenScience:post-buff-wormsfrom
mkovalua:fix/ENG--8563

Conversation

@mkovalua
Copy link
Contributor

Ticket

https://openscience.atlassian.net/browse/ENG-8563

Purpose

Download of QA owncloud file results in 502 Gateway error

Changes

owncloud use gzip for some file types (yml, json), allow to return actual file size not archived to read it properly by adding
headers={'Accept-Encoding': 'identity'}

image image image
Screen.Recording.2025-08-14.at.15.53.01.1.mp4

<CIMultiDictProxy('Server': 'nginx', 'Date': 'Thu, 14 Aug 2025 12:49:48 GMT', 'Content-Type': 'text/plain;charset=UTF-8', 'Content-Length': '17926', 'Connection': 'keep-alive', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '0', 'X-Robots-Tag': 'none', 'X-Frame-Options': 'SAMEORIGIN', 'X-Download-Options': 'noopen', 'X-Permitted-Cross-Domain-Policies': 'none', 'Expires': 'Thu, 19 Nov 1981 08:52:00 GMT', 'Cache-Control': 'no-store, no-cache, must-revalidate', 'Pragma': 'no-cache', 'Set-Cookie': 'oc_sessionPassphrase=FE60xqc6HURDD3sKesZTSnt5OFgHAvcqSiSiIA%2FVQpSBfQDL77UdxR5AIrQYgUm1xR3MmXGRoESimXygBXK%2BeXukCBExQm1WBMKddrDf%2FoEOb3b6dityYGbqrOQTNpp4; expires=Thu, 14-Aug-2025 13:09:48 GMT; Max-Age=1200; path=/; secure; HttpOnly; SameSite=None', 'Content-Security-Policy': "default-src 'none';", 'Last-Modified': 'Thu, 14 Aug 2025 11:13:35 GMT', 'Etag': '"79fcfbb494bbc2f6d284c9dfc47a5f76"', 'OC-ETag': '"79fcfbb494bbc2f6d284c9dfc47a5f76"', 'Content-Disposition': 'attachment; filename*=UTF-8\'\'docker-compose%20%285%29.yml; filename="docker-compose%20%285%29.yml"', 'OC-Checksum': 'SHA1:63a30fa9f8c0bb381f4e34bc0912a13bdc5e2e3d', 'Vary': 'Accept-Encoding', 'Strict-Transport-Security': 'max-age=15552000; includeSubDomains')>

Side effects

QA Notes

Deployment Notes

mkovalua and others added 9 commits August 11, 2025 22:18
 * (Signature of method X does not match signature of base method Y of the base)

   CenterForOpenScience#463 (comment)
 * add extra note about alternative implementation of some methods for
   s3 provider
   CenterForOpenScience#463 (comment)
 * S3 tests are skipped because request signing and client interaction
   have changed significantly on boto to boto3 migration, breaking the
   old test logic
   CenterForOpenScience#463 (comment)
 * with new one test fails with the following error

   # FAILED tests/server/api/v1/test_core.py::TestBaseHandler::test_write_error
   #   - TypeError: BaseHandler.write_error() takes 2 positional arguments but 3 were given

   maybe it cause additional issues (though old and new 'write_error'
   code looks to have same logic) even though we align test
 * pytest_runtest_setup and pytest_runtest_teardown is not used on
   test suite run for now, it looks to be redundant
   CenterForOpenScience#463 (comment)
@coveralls
Copy link

coveralls commented Aug 14, 2025

Coverage Status

coverage: 84.753%. remained the same
when pulling 57792e5 on mkovalua:fix/ENG--8563
into aae81c9 on CenterForOpenScience:post-buff-worms.

mkovalua and others added 5 commits August 14, 2025 15:58
 * owncloud gzips some file types (yml, json). Send the
   Accept-Encoding: identity header allow to return actual file size
   not archived to read it properly

 * update owncloud test_download_range to work with new download
   headers changes
felliott added a commit that referenced this pull request Aug 19, 2025
@felliott
Copy link
Member

This has been merged into feature/post-buff-worms, but I forgot to update the PR to target that before pushing. D'oh!

@felliott felliott closed this Aug 19, 2025
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.

4 participants