Bug 1940748
Summary: | Status Badges allow too permissive caching | ||
---|---|---|---|
Product: | [Community] Copr | Reporter: | Chris Bouchard <chris> |
Component: | backend | Assignee: | Silvie Chlupova <schlupov> |
Status: | CLOSED NEXTRELEASE | QA Contact: | |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | unspecified | CC: | dbranchini, emanuele, praiskup, schlupov |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-07-15 09:55:00 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Chris Bouchard
2021-03-19 04:32:07 UTC
GitHub's aggressive caching has been documented in an issue: https://github.com/github/markup/issues/224 According to user bkeepers in that issue discussion, they think their caching implementation is correct and don't plan to change it. We already have the no-cache header configured: https://pagure.io/copr/copr/blob/a13faa9be29005f68581ba6dc9a6c8e9427aa206/f/frontend/coprs_frontend/coprs/views/misc.py#_380 But it apparently stopped working: $ curl -v https://copr.fedorainfracloud.org/coprs/g/copr/copr-dev/package/copr-frontend/status_image/last_build.png 2>&1 >/dev/null | grep -i cache < Cache-Control: public, max-age=43200 Thank you for the report! No, the no-cache header is only added when it makes any sense - ie when the build state is going to be changed... OTOH if the build already failed or succeeded, nothing can actually change the state anymore and thus neither the icon -- and it is valid to have it cached. From one of the currently running builds: $ curl -v https://copr.fedorainfracloud.org/coprs/build/2081848/status_image.png 2>&1 >/dev/null | grep -i cache < Cache-Control: no-cache This seems to be OK to me, but feel free to reopen and add more info. @ Pavel, that makes sense for any individual build's status. The problem is when it's accessed via the package's `last_build.png` image (alias?), which IMO should *never* be cached because there could always be another build. PS. You mentioned to "feel free to reopen and add more info", but I'm new to Bugzilla. Should I change the status back to NEW? Ah, indeed! Thank you for the additional info. We need to better take care of the latest build batch. |