Skip to content

fix(importer): track REST Last-Modified header separately from LastUpdated - #6306

Merged
another-rex merged 1 commit into
google:masterfrom
another-rex:fix-rest-head-last-modified
Nov 5, 2026
Merged

another-rex merged 1 commit into
google:masterfrom
another-rex:fix-rest-head-last-modified

Conversation

@another-rex

@another-rex another-rex commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

REST all.json endpoints have HTTP Last-Modified header reflecting when the index file was built and uploaded. which is (generally) slightly later than the maximum modified timestamp in actual entries.

Because handleImportREST sets LastUpdated (last_update_date) to min(timeOfRun, maxModified, httpLastModified), LastUpdated ends up strictly earlier than the Last-Modified header.

This means we never actually save on any GET requests when we send a HEAD request.

Changes

This adds a new SourceRepository field into the datastore saving the HTTP REST LastModified header. (This will need to be migrated to sql at some point).

agy

@another-rex
another-rex force-pushed the fix-rest-head-last-modified branch 3 times, most recently from f2f4cdf to 963e36b Compare November 4, 2026 22:50
@another-rex
another-rex marked this pull request as ready for review November 4, 2026 23:04
@another-rex
another-rex force-pushed the fix-rest-head-last-modified branch from 963e36b to 1b6c27d Compare November 4, 2026 23:08
@another-rex
another-rex merged commit 098f684 into google:master Nov 5, 2026
23 checks passed
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.

2 participants