Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All DB updates from Daily DB publisher uses the same built date since job #467? #315

Closed
mblixter opened this issue May 21, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mblixter
Copy link

Since Daily DB builder job #467 all subsequent jobs promote the DB with the same built date 2024-05-17T01:31:32Z making grype scans fail due to the DB being to old?

From Job #471
Entry(built='2024-05-17T01:31:32Z', version=3, url='https://toolbox-data.anchore.io/grype/databases/vulnerability-db_v3_2024-05-17T01:31:32Z_1716180320.tar.gz', checksum='sha256:a559f9e84f8352a0419281b6e7e2d965d65b35112be172e1b24c9f5842950006')

From Job #470
Entry(built='2024-05-17T01:31:32Z', version=4, url='https://toolbox-data.anchore.io/grype/databases/vulnerability-db_v4_2024-05-17T01:31:32Z_1716094053.tar.gz', checksum='sha256:be8159d82fec4eb0f18b4538a22b763a7766ecb448d6cef75430a8d51c31c262')

@mblixter mblixter added the bug Something isn't working label May 21, 2024
@wagoodman wagoodman self-assigned this May 21, 2024
@wagoodman
Copy link
Contributor

wagoodman commented May 21, 2024

There is another DB build running now that should have updated timestamps. Here's what was going on:

The built field is poorly named -- it is really the age of the data that the DB is populated from. We gather data from several upstream sources, so we use the oldest timestamp amongst all of the timestamps from each provider. One of the upstream providers this weekend had a data outage over the weekend and a holiday, so the DB built field was held back to when this last provider was working. Luckily they restored their service this morning and a new DB should be going out shortly with the latest data.

We've already started making changes to start including more metadata about providers (such as data freshness for each) and will be including this information in the DB itself (probably eliminating the need to have a single old timestamp representing the DB). This will most likely land in the v6 DB schema changes (which design work has only just begun).

@wagoodman
Copy link
Contributor

Confirmed we're now seeing the correct timestamps:

grype db list -o json | jq | head -n 20
[
  {
    "built": "2024-05-21T10:13:53Z",
    "version": 5,
    "url": "https://toolbox-data.anchore.io/grype/databases/vulnerability-db_v5_2024-05-21T10:13:53Z_1716302442.tar.gz",
    "checksum": "sha256:463f62c79b5c95f914d5938f3a116ff329b854a715243ac29f64d08c5a8c048d"
  },
  {
    "built": "2024-05-17T01:31:32Z",
    "version": 5,
    "url": "https://toolbox-data.anchore.io/grype/databases/vulnerability-db_v5_2024-05-17T01:31:32Z_1716007601.tar.gz",
    "checksum": "sha256:96a5396fc536f1d239960a3719114d198a7e191485d5e87a5232c22dfc99cafb"
  },
  {
    "built": "2024-05-17T01:31:32Z",
    "version": 5,
    "url": "https://toolbox-data.anchore.io/grype/databases/vulnerability-db_v5_2024-05-17T01:31:32Z_1716094011.tar.gz",
    "checksum": "sha256:ef89a271e05c74ba54c2d756386dc2b0386827f370612dd632bb559137ef8f93"
  },
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants