500 Error when getting licenses from Leiningen projects

Issue #98 resolved
Cam Cook created an issue

I've seen this through the API and through veye (which I assume is using the API), but not though the website.

Uploaded a leiningen project successfully, then went used GET /v2/projects/{project_key}/licenses. And got a 500 response.

  • from projects route
  {
    "id": "559c0c9c343162000f0558cc",
    "project_key": "lein_project_clj_2",
    "name": "project.clj",
    "project_type": "Lein",
    "public": true,
    "period": "daily",
    "source": "API",
    "dep_number": 14,
    "out_number": 7,
    "licenses_red": 0,
    "licenses_unknown": 3,
    "dep_number_sum": 14,
    "out_number_sum": 7,
    "licenses_red_sum": 0,
    "licenses_unknown_sum": 3,
    "license_whitelist_name": null,
    "created_at": "07.07.2015-17:30",
    "updated_at": "07.07.2015-17:30"
  },
  • from projects licenses route with lein_project_clj_2 as a parameter
{
  "status": "500",
  "error": "Internal Server Error"
}

Comments (9)

  1. Robert Reiz

    @ccook_ I will take a closer look to this issue today. In the mean while you could try it with the project id instead of the project_key.

  2. Robert Reiz

    @ccook_ I just double checked the code. There is a unit test for that endpoint and it's still green. Currently I don't see what's wrong. Can you please try it with the project id and let me know if it works or not?

  3. Robert Reiz

    @jnowell @ccook_ If you guys have to deal with licenses you might be interested in the license whitelist feature. There are several tools to use that feature on the CI system. For example the VersionEye Maven Plugin, which offers a goal:

    mvn versioneye:licenseCheck
    

    It checks the actual used license dependencies against a whitelist and if there is a violation it breaks your build.

    And the "versioneye_license_check" is a more generic project for the same use case. It works like that:

    > ./versioneye_license_check.sh <PROJECT_FILE>
    

    And returns an EXIT code 2 if there is a violation.

    Let me know if you need more help with that.

  4. Log in to comment