Page MenuHomeSoftware Heritage

api_route: Ensure never_cache is honored for all response status codes
ClosedPublic

Authored by anlambert on Wed, Feb 17, 1:55 PM.

Details

Summary

Previously never cache headers were only added for responses with status code
200 but error responses must also be considered.

So move never_cache parameter handling of api_route decorator from apiurls
module to apiresponse one.

Related to T2774

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D5094 (id=18188)

Rebasing onto 113957105c...

Current branch diff-target is up to date.
Changes applied before test
commit eecf55400525d38c1a93508ba3694ad2837100db
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Feb 17 13:49:48 2021 +0100

    api_route: Ensure never_cache is honored for all response status codes
    
    Previously never cache headers were only added for responses with status code
    200 but error responses must also be considered.
    
    So move never_cache parameter handling of api_route decorator from apiurls
    module to apiresponse one.
    
    Related to T2774

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/573/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/573/console

Harbormaster returned this revision to the author for changes because remote builds failed.Wed, Feb 17, 1:58 PM
Harbormaster failed remote builds in B19289: Diff 18188!

Diff failing not due to the change but due to D5093
(should fix this provided D5077 is landed/released first)

Build is green

Patch application report for D5094 (id=18193)

Rebasing onto 2e0ccea86a...

Current branch diff-target is up to date.
Changes applied before test
commit 2fbbbb95ef8b582f48efe189d46f0fe0d613e5dd
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Feb 17 13:49:48 2021 +0100

    api_route: Ensure never_cache is honored for all response status codes
    
    Previously never cache headers were only added for responses with status code
    200 but error responses must also be considered.
    
    So move never_cache parameter handling of api_route decorator from apiurls
    module to apiresponse one.
    
    Related to T2774

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/575/ for more details.

This revision is now accepted and ready to land.Wed, Feb 17, 3:57 PM