Invalidate `last_update_date` when source changes
- Dominant language
- Go
- Stars
- 2.9k
- Forks
- 369
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 149
Description
Currently, if we change e.g. a bucket or REST endpoint in a SourceRepository and reimport, we may have the following race condition with these checks:
https://github.com/google/osv.dev/blob/6b36cfb6432c37bd2c68e2260f13adff9f0dd45f/docker/importer/importer.py#L465
https://github.com/google/osv.dev/blob/6b36cfb6432c37bd2c68e2260f13adff9f0dd45f/docker/importer/importer.py#L671
This checks whether the candidate record was updated since the last `SourceRepository` update as an optimisation.
However, if the bucket/REST URL changes, this is irrelevant, and could lead to missed imports because the new bucket/REST URL could've been populated before the last `SourceRepository` import with the old source.
Contributor guide
Assessment
This issue has not been assessed yet.