Simplify handling of licenses#299
Merged
cert-manager-prow[bot] merged 1 commit intoJun 17, 2025
Merged
Conversation
Currently, changes to dependencies usually trigger a corresponding need to run "make generate-go-licenses" to update the LICENSES file. The ultimate aim of this file is to track that the licenses we use are compliant with the policies we operate under (i.e. those of the CNCF). As such, the most important thing is tracking when licenses change. It isn't helpful for us to have to do busywork just to update the version number of a dependency in the LICENSES file; that mostly serves to break dependabot PRs and doesn't provide us with useful functionality. Instead, if we log out the module name and the license, we get the ability to track and audit licenses, providing a useful signal when a license changes or a new dependency is added that a maintainer should take a careful look at what changed to ensure compliance. Signed-off-by: Ashley Davis <ashley.davis@cyberark.com>
Contributor
|
/lgtm |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ThatsMrTalbot The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
inteon
reviewed
Jun 17, 2025
| GOWORK=$(abspath $(licenses_go_work)) \ | ||
| GOOS=linux GOARCH=amd64 \ | ||
| $(GO-LICENSES) report --ignore "$$(license_ignore)" ./... > LICENSES | ||
| $(GO-LICENSES) report --ignore "$$(license_ignore)" --template $(dir $(lastword $(MAKEFILE_LIST)))/licenses.tmpl ./... > LICENSES |
Member
There was a problem hiding this comment.
I'm getting this error: F0617 11:53:58.644045 7139 main.go:75] open make/_shared/licenses//licenses.tmpl: no such file or directory
see https://github.com/cert-manager/trust-manager/actions/runs/15706463048/job/44253339339
Member
Author
There was a problem hiding this comment.
Looking into it; worked for me locally (of course :D)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, changes to dependencies usually trigger a corresponding need to run "make generate-go-licenses" to update the LICENSES file.
The ultimate aim of this file is to track that the licenses we use are compliant with the policies we operate under (i.e. those of the CNCF). As such, the most important thing is tracking when licenses are added or when a project changes its license.
It isn't helpful for us to have to do busywork just to update the version number of a dependency in the LICENSES file; that mostly serves to break dependabot PRs and doesn't provide us with useful functionality.
Instead, if we log out the module name and the license we get the ability to track and audit licenses when they change, providing a useful signal that a maintainer should take a careful look at what changed to ensure compliance.
Example of a LICENSES file (from openshift-routes) generated with the new template: