[ci][3PP License Check] Detect when dash-licenses exits with an internal error #12545
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
This commit adapts the
check_3pp_licenses.js
script to handle new "127" exit code from dash-licenses. This follows us noticing that it was possible for the script to not detect thatdash-licenses
had encountered an internal error, not related to the 3PPs licenses, that voided the run's results. We will now detect such cases and appropriately exit with an error code, so that if this happens in CI, the job will fail.See dash-licenses issue:
eclipse-dash/dash-licenses#236
and Pull Request:
eclipse-dash/dash-licenses#237
How to test
Check that you can successfully still run
yarn license:check
locally. I guess it would be possible to use a mockdash-licenses
that exits with code127
could be used to test the change, but it may not be necessary.Review checklist
Reminder for reviewers