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

Error curating component when license expressions contain empty element #999

Open
qtomlinson opened this issue Sep 27, 2022 · 2 comments
Open

Comments

@qtomlinson
Copy link
Collaborator

qtomlinson commented Sep 27, 2022

Reproducing Steps:

  1. Go to https://dev.clearlydefined.io/definitions/git/github/gardener/external-dns-management/ae804dcb1b3a49ded12169c694130993c68ced9f
  2. Click the "SPDX license" place holder under Licensd.Declared to open License Expression editor
  3. Select "MIT" license
  4. Click Add Rule, select "Apache-2.0" license
  5. Click Add Group, Click And, select "BSD-3-Clause" license
  6. Save (see license expression image)
  7. Click Contribute and fill out the contribution information and click OK.
  8. Error in popup: Contribution ERROR: undefined:
    [{"coordinates":{"type":"git","provider":"github","namespace":"gardener","name":"external-dns-management","revision":"ae804dcb1b3a49ded12169c694130993c68ced9f"},"revisions":{"ae804dcb1b3a49ded12169c694130993c68ced9f":{"licensed":{"declared":"MIT AND Apache-2.0 AND BSD-3-Clause "}}}}]
@qtomlinson
Copy link
Collaborator Author

License expression:
image

@qtomlinson
Copy link
Collaborator Author

qtomlinson commented Sep 27, 2022

In the debug console: PATCH call to https://dev-api.clearlydefined.io/curations results in 400
The error in response is
{ "errors": [ [ { "message": "Invalid license in curation", "error": "ae804dcb1b3a49ded12169c694130993c68ced9f licensed.declared with value \"MIT AND Apache-2.0 AND BSD-3-Clause \" is not SPDX compliant" } ] ], "patchesInError": [ { "coordinates": { "type": "git", "provider": "github", "namespace": "gardener", "name": "external-dns-management", "revision": "ae804dcb1b3a49ded12169c694130993c68ced9f" }, "revisions": { "ae804dcb1b3a49ded12169c694130993c68ced9f": { "licensed": { "declared": "MIT AND Apache-2.0 AND BSD-3-Clause " } } } } ] }

The reason that the patch call failed is that there is a trailing space after "BSD-3-Clause" in licensed.declared: "MIT AND Apache-2.0 AND BSD-3-Clause ". Removing the trailing space, the patch call and the curation workflow is successful.

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

No branches or pull requests

1 participant