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

spec-parser run reports errors but exits with 0 #80

Open
maxhbr opened this issue Dec 8, 2023 · 1 comment
Open

spec-parser run reports errors but exits with 0 #80

maxhbr opened this issue Dec 8, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@maxhbr
Copy link
Member

maxhbr commented Dec 8, 2023

The current spec parser reports an error but does still exit with EXIT_SUCCESS. See for example https://github.com/spdx/spdx-3-model/actions/runs/7118823989/job/19382571564#step:5:25 with the log:

 > Run cd spec-parser
WARNING : External property restrictions aren't yet handled properly, they are added to the description of the class.
WARNING : skipping ../model/Core/Properties/_property.md
WARNING : skipping ../model/Core/Vocabularies/_vocab.md
WARNING : External property restrictions aren't yet handled properly, they are added to the description of the class.
WARNING : External property restrictions aren't yet handled properly, they are added to the description of the class.
WARNING : External property restrictions aren't yet handled properly, they are added to the description of the class.
WARNING : External property restrictions aren't yet handled properly, they are added to the description of the class.
WARNING : Overwriting out_dir `/tmp/spec-parser.out`
ERROR   : Invalid Nature attribute in metadata `None`
@goneall
Copy link
Member

goneall commented Dec 11, 2023

In looking at the code, the spec-parser continues to run after the "Error".

Perhaps these are just warnings?

If they are indeed errors - should we stop processing and flag the error?

For the CI, I think it would be useful to report these as errors.

It looks like the methods that log the error all return a None value.

If we want to continue execution rather than raise an exception, we can change the return value to an integer which would be a return code - 0 being success. Then can then be used to set the system level return code.

@zvr @maxhbr - if you agree with the above and would like some help, I can write a PR.

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
None yet
Development

No branches or pull requests

2 participants