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

Handle cataloger panics #1624

Closed
kzantow opened this issue Feb 24, 2023 · 1 comment · Fixed by #1636
Closed

Handle cataloger panics #1624

kzantow opened this issue Feb 24, 2023 · 1 comment · Fixed by #1636
Assignees
Labels
enhancement New feature or request

Comments

@kzantow
Copy link
Contributor

kzantow commented Feb 24, 2023

What would you like to be added:
If any single cataloger panics, the entire Syft execution terminates. It would be nice to loudly log these as ERROR messages but allow Syft to continue cataloging and return a result.

Why is this needed:
Prevent Syft from crashing and give as much information as possible to users.

Additional context:
There was a recent ticket, #1621, in which Syft panic'd and the entire run failed, where we could have cataloged everything except a single file that caused the panic, and reported that file. This would help Syft development as well, because it would be much easier for users to point developers to failed files.

@kzantow kzantow added the enhancement New feature or request label Feb 24, 2023
@wagoodman
Copy link
Contributor

we can add a recovery statement here so that no cataloger can cause a non-recoverable panic https://github.com/anchore/syft/blob/main/syft/pkg/cataloger/catalog.go#L100

@kzantow kzantow self-assigned this Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants