Skip to content

scan: make max db allowed build age configurable #1677

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

Merged
merged 4 commits into from
Jul 14, 2025

Conversation

hectorj2f
Copy link
Member

@hectorj2f hectorj2f commented Jul 14, 2025

This changes the current default value for the grype configuration max-allowed-built-age to 120h as in Grype. We currently set it to 48h.

We made this change to temporary overcome this issue on the upstream grype repo https://github.com/anchore/grype-db/actions/workflows/daily-db-publisher-r2.yaml which has been failing during the last 2 days.

@hectorj2f hectorj2f self-assigned this Jul 14, 2025
@hectorj2f hectorj2f requested review from philroche and vaikas July 14, 2025 17:09
Signed-off-by: Hector Fernandez <[email protected]>
// DisableSBOMCache controls whether the scanner will cache SBOMs generated from
// APKs. If true, the scanner will not cache SBOMs or use existing cached SBOMs.
DisableSBOMCache bool
}

// DefaultOptions is the recommended default configuration for a new Scanner.
// These options are suitable for most use scanning cases.
var DefaultOptions = Options{}
var DefaultOptions = Options{
MaxAllowedBuildAge: 120 * time.Hour,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we planning to keep the 120 permanently or temporary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a temporary change, I've added a warning suggesting a recommended age. I also added a note to the code.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems really confusing
we have a recommended age of 48hrs, but default to 120hrs

i guess until we better understand the reasoning behind the 48hr
i would recommend keeping the default behavior and allowing users to avoid it as necessary
rather than setting a new default that really shouldnt be the default

@hectorj2f hectorj2f force-pushed the change_max_allowed_build_age branch from 9f74f2d to aaffeec Compare July 14, 2025 18:02
@rawlingsj rawlingsj merged commit ed37197 into wolfi-dev:main Jul 14, 2025
5 checks passed
@hectorj2f hectorj2f deleted the change_max_allowed_build_age branch July 14, 2025 20:05
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.

3 participants