dash-licenses icon indicating copy to clipboard operation
dash-licenses copied to clipboard

Option to not fail the build if there is a backend issue

Open msohn opened this issue 1 year ago • 3 comments

In JGit and EGit we use the maven license-tool-plugin in all builds with dash.fail = true. This works great to prevent adding unvetted dependencies not meeting the criteria.

Though sporadically the check fails since ClearlyDefined is unhealthy or responds with HTTP status 429 if we hit the rate limit.

Would it make sense to add an option to allow skipping the license check if that happens to prevent that such issues fail the build and instead only raise a warning in the build log ?

msohn avatar May 24 '23 15:05 msohn

As more projects incorporate this into their builds, we're going to hit the rate limit more frequently. We should probably try to address that. I assume that there's some way to register and get a higher rate limit. I'll investigate that.

How is what you're suggesting different from setting dash.fail=false ?

waynebeaton avatar May 24 '23 21:05 waynebeaton

It's different from dash.fail=false that it would fail the build only if we have explicit evidence that dependencies don't meet criteria. If backend systems like ClearlyDefined are unhealthy or rate limits hit we have no evidence for that hence gracefully skip the check and emit a warning.

msohn avatar May 24 '23 21:05 msohn

I also recently noted this:

Failed to execute goal org.eclipse.dash:license-tool-plugin:1.0.3-SNAPSHOT:license-check (default-cli) on project tycho: Execution default-cli of goal org.eclipse.dash:license-tool-plugin:1.0.3-SNAPSHOT:license-check failed: Received an error response from ClearlyDefined. -> [Help 1]

First the user has no clue what the error response is/was, so probably the error message can be improved, beside that in most cases its helps to simply rerun the check again. I therefor think it would be good if one can simply have a number of retries (e.g. 10) in this case using and using an (randomized) Exponential backoff between retries.

laeubi avatar May 30 '23 06:05 laeubi