Skip SPDX deprecated licenses
What does this MR do?
While testing the changes in !24829 (merged) I found duplicate
names in the SPDX catalogue.
モ curl -s https://spdx.org/licenses/licenses.json | jq '.licenses[].name' | sort | uniq -c | grep -v '1 \"'
2 "GNU General Public License v1.0 only"
2 "GNU General Public License v1.0 or later"
2 "GNU General Public License v2.0 only"
2 "GNU General Public License v2.0 or later"
2 "GNU General Public License v3.0 only"
2 "GNU General Public License v3.0 or later"
2 "GNU Lesser General Public License v2.1 only"
2 "GNU Lesser General Public License v3.0 only"
2 "GNU Lesser General Public License v3.0 or later"
2 "GNU Library General Public License v2 only"
2 "GNU Library General Public License v2 or later"
2 "Standard ML of New Jersey License"
When diving in a bit deeper it looks like the duplicate names exist because the catalogue performs a soft delete by marking the old entry as deprecated via the isLicenseIdDeprecated
.
モ curl -s https://spdx.org/licenses/licenses.json | jq '.licenses[] | "\(.licenseId) \(.name) \(.isDeprecatedLicenseId)"' | grep 'GNU General Public License v1.0 only'
"GPL-1.0 GNU General Public License v1.0 only true"
"GPL-1.0-only GNU General Public License v1.0 only false"
This change updates the ImportSoftwareLicensesWorker
to skip licenses that have been marked as deprecated in the SPDX catalogue.
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. - [-] Tested in all supported browsers
-
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team