Closed tisnik closed 6 years ago
The license analysis service returns incorrect data with the status set to failure. The output is different from one used in documentation.
failure
Post the following payload taken from the Request and Response doc for dependency editor to the analytics_license service on prod-preview:
prod-preview
"_resolved": [ { "package": "com.googlecode.xmemcached:xmemcached", "version": "2.3.2" }, { "package": "commons-fileupload:commons-fileupload", "version": "1.3" }, { "package": "org.springframework.boot:spring-boot-starter-web", "version": "1.4.1.RELEASE" }, { "package": "com.h2database:h2", "version": "1.4.192" }, { "package": "org.springframework.boot:spring-boot-starter-data-jpa", "version": "1.4.1.RELEASE" } ], "ecosystem": "maven" }
{ "conflict_packages": [], "distinct_licenses": [ "apache 2.0" ], "message": "No declared licenses found for 3 component(s).", "outlier_packages": [], "packages": [ { "license_analysis": { "_message": "Representative license found", "_representative_licenses": "apache 2.0", "conflict_licenses": [], "outlier_licenses": [], "status": "Successful", "synonyms": { "Apache License, Version 2.0": "apache 2.0" }, "unknown_licenses": [] }, "licenses": [ "Apache License, Version 2.0" ], "package": "com.googlecode.xmemcached:xmemcached", "version": "2.3.2" }, { "license_analysis": { "_message": "Representative license found", "_representative_licenses": "apache 2.0", "conflict_licenses": [], "outlier_licenses": [], "status": "Successful", "synonyms": { "Apache 2.0": "apache 2.0" }, "unknown_licenses": [] }, "licenses": [ "Apache 2.0" ], "package": "commons-fileupload:commons-fileupload", "version": "1.3" }, { "license_analysis": { "_message": "Input is invalid", "_representative_licenses": null, "conflict_licenses": [], "outlier_licenses": [], "status": "Failure", "synonyms": {}, "unknown_licenses": [] }, "licenses": [], "package": "org.springframework.boot:spring-boot-starter-web", "version": "1.4.1.RELEASE" }, { "license_analysis": { "_message": "Input is invalid", "_representative_licenses": null, "conflict_licenses": [], "outlier_licenses": [], "status": "Failure", "synonyms": {}, "unknown_licenses": [] }, "licenses": [], "package": "com.h2database:h2", "version": "1.4.192" }, { "license_analysis": { "_message": "Input is invalid", "_representative_licenses": null, "conflict_licenses": [], "outlier_licenses": [], "status": "Failure", "synonyms": {}, "unknown_licenses": [] }, "licenses": [], "package": "org.springframework.boot:spring-boot-starter-data-jpa", "version": "1.4.1.RELEASE" } ], "stack_license": null, "status": "Failure", "unknown_licenses": { "component_conflict": [], "really_unknown": [] } }
{ "conflict_packages": [], "license_filter": { "alternate_packages": { "compatible_packages": [], "conflict_packages": [], "unknown_license_packages": [] }, "companion_packages": { "compatible_packages": [], "conflict_packages": [], "unknown_license_packages": [] } }, "outlier_packages": {}, "packages": [ { "license_analysis": { "_message": "Representative license found", "_representative_licenses": "epl 1.0", "conflict_licenses": [], "outlier_licenses": [], "status": "Successful", "synonyms": { "APACHE": "apache 2.0", "Eclipse Public License": "epl 1.0" }, "unknown_licenses": [] }, "licenses": [ "APACHE", "Eclipse Public License" ], "package": "p1", "version": "1.1" }, { "license_analysis": { "_message": "Representative license found", "_representative_licenses": "gplv2", "conflict_licenses": [], "outlier_licenses": [], "status": "Successful", "synonyms": { "BSD": "bsd-new", "GPL V2": "gplv2" }, "unknown_licenses": [] }, "licenses": [ "BSD", "GPL V2" ], "package": "p2", "version": "1.1" } ], "stack_license": "gplv2", "status": "Successful" }
As the document is updated with correct output. Hence closing this issue. Ref - https://github.com/openshiftio/openshift.io/issues/4031
Problem description
The license analysis service returns incorrect data with the status set to
failure
. The output is different from one used in documentation.Input
Post the following payload taken from the Request and Response doc for dependency editor to the analytics_license service on
prod-preview
:Output from the service
Expected output