Skip to content

Print the errors of the check_license.py #3731

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

Open
psaiz opened this issue Apr 14, 2025 · 1 comment · May be fixed by #3732
Open

Print the errors of the check_license.py #3731

psaiz opened this issue Apr 14, 2025 · 1 comment · May be fixed by #3732
Assignees

Comments

@psaiz
Copy link
Contributor

psaiz commented Apr 14, 2025

Check the output of this action:

Run ./run-tests.sh --data-licenses
[INFO] Successfully validated file cms-trigger-information-2012.json
[INFO] Successfully validated file cms-pileup-datasets-2012.json
...
[INFO] Processed 3[28](https://github.com./cernopendata/opendata.cern.ch/actions/runs/14442278086/job/40494898258#step:4:29) files within 1.99 seconds.
Error:  Validation completed with 1 errors!
	Please ensure the licenses are one of the following: ['CC0-1.0', 'GPL-3.0-only', 'MIT', 'Apache-2.0', 'BSD-3-Clause'].
	If you are using a valid SPDX license string that is not in the above list, please contact `[email protected]`.
Error: Process completed with exit code 1.

It would be useful to have the ERROR messages fro the files that are not validated. In cases like invalid json, they just fail silently.
I would also demote the [INFO] Successfully validated file .. to DEBUG level.

@Biscgit Biscgit self-assigned this Apr 14, 2025
@Biscgit
Copy link
Member

Biscgit commented Apr 14, 2025

Thanks for the reporting!

The issue with that pipeline in this case is, that one of the JSON documents has an invalid format (caught by the data-json action).
The license-checker only prints out license specific checks, but still catches the general error on loading the file.

I will add a try...except block to the loading of the file.

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 a pull request may close this issue.

2 participants