criticality_score icon indicating copy to clipboard operation
criticality_score copied to clipboard

The process stops on error instead of continuing with the following repository.

Open coni2k opened this issue 2 years ago • 2 comments

When the script encounters an error, it stops the process. Ideally, it should log the error and continue with the following repository.

This is not a convenient experience, especially when processing a huge number of repositories.

Command:

go run .\cmd\criticality_score -gcp-project-id=[Project ID] ".\output\repos.txt"

repos.txt content

https://github.com/404/repo-not-found -- A non-existent repo URL; the script will stop the process here
https://github.com/babel/babel -- And this one will not be processed

Output

> go run .\cmd\criticality_score -gcp-project-id=[Project ID] ".\output\repos.txt"
2023-08-03 12:28:10.466 INFO    Preparing default scorer
2023-08-03 12:28:11.827 INFO    deps.dev signal source enabled
2023-08-03 12:28:12.386 WARN    Repo cannot be collected        {"worker": 0, "url": "https://github.com/404/repo-not-found", "error": "repo failed: not found: https://github.com/404/repo-not-found"}
main.main.func1
        C:/Dev/Projects/Personal/GitHub/criticality_score_go/cmd/criticality_score/main.go:210
github.com/ossf/criticality_score/internal/workerpool.WorkerPool.func1
        C:/Dev/Projects/Personal/GitHub/criticality_score_go/internal/workerpool/workerpool.go:36

coni2k avatar Aug 03 '23 11:08 coni2k

@calebbrown

sttor avatar Jul 22 '24 15:07 sttor

Having this would be great!

Garcel avatar Jul 31 '24 08:07 Garcel