Repository navigation
Add THIRD_PARTY_NOTICES.md and a generator for it - #1950
Merged
Merged
Conversation
abrarshivani
marked this pull request as ready for review
August 7, 2026 22:03
abrarshivani
requested review from
cdesiniotis,
karthikvetrivel,
rahulait,
rajathagasthya,
shivamerla and
tariq1890
August 7, 2026 22:41
abrarshivani
force-pushed
the
third-party-notices
branch
from
August 11, 2026 00:37
12646bd to
2da0e39
Compare
rahulait
reviewed
Aug 11, 2026
rahulait
reviewed
Aug 11, 2026
tariq1890
reviewed
Aug 11, 2026
tariq1890
reviewed
Aug 11, 2026
abrarshivani
force-pushed
the
third-party-notices
branch
6 times, most recently
from
August 11, 2026 23:26
411981a to
e507275
Compare
tariq1890
reviewed
Aug 12, 2026
abrarshivani
force-pushed
the
third-party-notices
branch
from
August 12, 2026 18:47
9c196fe to
93c8603
Compare
Co-authored-by: Tariq <tariq181290@gmail.com> Signed-off-by: Abrar Shivani <ashivani@nvidia.com>
abrarshivani
force-pushed
the
third-party-notices
branch
from
August 12, 2026 19:09
93c8603 to
a878412
Compare
tariq1890
approved these changes
Aug 12, 2026
Contributor
|
The description still says this
I am assuming this is just outdated? |
Contributor
Author
|
@tariq1890 Yes this is outdated as following from deployments/devel are not shipped. |
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.
Adds
THIRD_PARTY_NOTICES.md, listing every Go dep with the verbatim text ofits license, and the generator that produces it.
make third-party-noticesregenerates itmake check-third-party-noticesregenerates and diffs it, and runs on every buildCovers the modules linked into the four
cmd/binaries in the released image.What to review
96% of the diff is generated. Hand-written:
hack/generate-third-party-notices.sh.github/workflows/third-party-notices-check.yamlMakefile.github/workflows/basic-checks.yaml.gitignoredeployments/devel/tools.goGenerated:
THIRD_PARTY_NOTICES.md(10966 lines),deployments/devel/go.modand
go.sum(164).How it works
./bin/go-licensesso the version pinned indeployments/devel/go.modruns.
tools.gogains the blank import somake install-toolsandmake -C deployments/devel check-moduleskeep that pin honestdeployments/container/multi-arch.mk, failif out of sync, so a new image target cannot silently produce a short file
go-licenses saveandcsvover./cmd/...once per released platform,from
vendor/, then merge. It resolves only the host platform, build-taggedsources differ per target, and there is no union mode
module@versionfromvendor/modules.txtby longest-prefix matchImplementation notes
make cmdsdoes not turn it off, and the released binarieslink NVML through cgo. With
CGO_ENABLED=0, build constraints exclude everyfile in
github.com/NVIDIA/go-nvml/pkg/dl, and bothgo-licenses saveandcsvfail withbuild constraints exclude all Go filesand exit 1, so therun stops rather than writing a short file. No C compiler is needed, since
go-licensesonly lists and parses.--ignore. It matches raw string prefixes,not path segments. Passing the stdlib names adds the token
go, whichsilently drops 15 of the 74 entries, including gRPC, protobuf, all of
golang.org/x/*and all ofgopkg.in/*, with a zero exit. Measured bothways.
go-licensesemits a row per recognisedlicense, so keeping one would hide
filepath-securejoin's MPL-2.0 behind itsBSD-3-Clause.
module@version, not a URL. In vendor modego-licenseslinksinto this repository at
HEAD, which stops describing the released contentonce
mainadvances and names this copy rather than upstream.LC_ALL=Con everysort and grep. Whole-line
sort -uinstead of by key, which BSD and GNU sorttie-break differently. The awk counts instead of using
in, which mawk andBSD awk disagree on.
grep -aso a NUL byte cannot change the fence width.go-licensesreports a license itcannot classify as
Unknownand still exits 0, so without a guard the filewould ship an entry that attributes nothing. Licenses are joined, so the check
is anchored on both sides: it catches
BSD-3-Clause / Unknownas well as abare
Unknown, and leaves one legitimately namedUnknown-Somethingalone.An empty license field is caught too, since it would otherwise render as
Unknownin the document.mv, notcp.cptruncates the target first, soan interrupted run would leave a half-written file.
Scope
./cmd/...is whatmake cmdsbuilds:CMDSis a wildcard over./cmd/*, andthe Dockerfile runs
make PREFIX=/artifacts cmdsthen copies all four binariesinto the image. Against
./...the only extra is the localinternal/resource/testinghelper, which brings in no third-party dep.Not covered:
deployments/devel. They are not redistributed, so theycarry no attribution obligation.
preamble links to its OSS listing.
including any source-distribution obligations it carries. The preamble records
that it is GPLv2.
tests/, a separate module with its owngo.modandvendor tree, so its deps cannot reach this graph.
Shipping
Committed to the repository. Not copied into the image, so image size is
unchanged, and not attached to releases, so the release flow is untouched.
make check-third-party-noticesruns on every build, not behind a changed-pathsfilter. The list is the import set of
./cmd/..., so it goes stale when anordinary
.gofile changes its imports, not only whengo.modorvendor/move. A filter keyed on manifests would pass green and the failure would land on
maininstead of the PR that caused it.Testing
golang:1.26.5(mawk1.3.4, GNU coreutils):
c401458af84d245cf45a0f438a9899a3e9e97f88c43316dbf683386bc9756d2a. Two runson one host also match.
go-licenses:go list -deps ./cmd/...onlinux/amd64andlinux/arm64gives 513 non-stdlib, non-local packages,mapped by longest prefix to 74 license dirs in
vendor/. Expected 74, present74, 0 missing, 0 extra.
Unknownlicenses, 0 "License text unavailable", 0 unresolvedmodule@version.filepath-securejoin,sigs.k8s.io/json,sigs.k8s.io/yaml) match the files invendor/.make check-third-party-noticespasses on the committed file, and fails witha clear message when it is stale and when it is untracked. The
basic / third-party-noticesjob passes here.multi-arch.mkorvendor/modules.txt, a platformmatrix out of sync, a filesystem
replacedirective, an unreadable modulelist. Each fails with a specific message and a non-zero exit.
make -C deployments/devel check-modulespasses.shellcheckclean onhack/generate-third-party-notices.sh.actionlintandyamllintreport nothing on the new and changed workflows.