Use If-Modified-Since instead of If-None-Match when updating the remote parts
Metadata
Current evaluation
Fixed remote-parts cache freshness handling in snapcore/snapcraft#635, committed as f35b0992a, by using Last-Modified/If-Modified-Since.
Resolution: closed resolved
Reason: The linked PR snapcore/snapcraft#635 addressed the parts-cache validation problem and landed as commit f35b0992a ("Fix parts cache handling").
Evaluated by: mr-cal-bot
No scores available.
Issue body
requests sends "Accept-Encoding: gzip, deflate" by default which causes parts.snapcraft.io not to send an ETag, so the logic for detecting when the parts cache is already up to date didn't work. Use Last-Modified /If-Modified-Since instead of ETag / If-None-Match.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed remote-parts cache freshness handling in snapcore/snapcraft#635, committed as f35b0992a, by using Last-Modified/If-Modified-Since. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcraft PR #635, merged as commit f35b0992a ("Fix parts cache handling"), which replaced ETag/If-None-Match parts cache validation with Last-Modified/If-Modified-Since since parts.snapcraft.io omits ETags for gzip responses. | |
| stealth/space-bunny-alpha | — | closed resolved | Remote-part cache validation was fixed by switching from ETag/If-None-Match to Last-Modified/If-Modified-Since, preventing missed updates when parts.snapcraft.io omitted ETags. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed remote-parts cache validation by using Last-Modified/If-Modified-Since instead of relying on ETags, restoring reliable updates. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by switching cache validation from ETag to Last-Modified/If-Modified-Since headers. Default Accept-Encoding settings prevented ETag generation, breaking cache updates. The change restores reliable remote parts synchronization. | |
| qwen/qwen3.6-35b-a3b | — | — | Resolved by switching cache validation from ETag/If-None-Match to Last-Modified/If-Modified-Since headers. The original ETag logic failed because the requests library default Accept-Encoding header prevented the server from generating ETags. | |
| qwen/qwen3.6-35b-a3b | — | — | Fixed by implementing the suggested switch to Last-Modified/If-Modified-Since headers, resolving the cache update detection failure caused by default requests library headers blocking ETag responses. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#635
(confidence 100%)
The issue comment links this PR, and repository history records its fix as commit f35b0992a.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #635 Fix parts cache handling | snapcraft | merged | Merged in commit f35b0992a, replacing ETag cache validation with Last-Modified/If-Modified-Since because gzip responses from parts.snapcraft.io omitted ETags. | |
| #1719928 snapcraft update won't fetch from SNAPCRAFT_PARTS_URI | snapcraft (launchpad) | closed | Fixed by snapcore/snapcraft PR #1856, which keyed cached parts data by SNAPCRAFT_PARTS_URI so alternate part sources were no longer treated as already current. |