Add THIRD_PARTY_NOTICES.md and a generator for it - #77
Merged
Conversation
abrarshivani
marked this pull request as ready for review
August 11, 2026 05:41
abrarshivani
force-pushed
the
third-party-notices
branch
4 times, most recently
from
August 14, 2026 18:47
70e669f to
7eb2499
Compare
Signed-off-by: Abrar Shivani <ashivani@nvidia.com>
abrarshivani
force-pushed
the
third-party-notices
branch
from
August 14, 2026 19:48
7eb2499 to
4b649b5
Compare
tariq1890
reviewed
Aug 14, 2026
abrarshivani
force-pushed
the
third-party-notices
branch
from
August 14, 2026 22:44
43378e6 to
fca0f00
Compare
The generator declared vendored non-Go files that carry their own license terms and reproduced their headers, which meant restating nvml.h's NVIDIA notice. Whether that belongs in a third-party notices file is unsettled, so leave it out and cover only what go-licenses reports, matching the generators in nvidia-container-toolkit, mig-parted and k8s-device-plugin. Signed-off-by: Abrar Shivani <ashivani@nvidia.com>
abrarshivani
force-pushed
the
third-party-notices
branch
from
August 14, 2026 23:48
fca0f00 to
7ce0a86
Compare
tariq1890
approved these changes
Aug 14, 2026
Contributor
|
Thank you @abrarshivani ! |
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.mdfor this module's third-party Go deps, the scriptthat generates it, and a CI check that fails when deps change without the notices
being refreshed.
The same change is already merged in gpu-operator, mig-parted, k8s-device-plugin,
k8s-driver-manager and nvidia-container-toolkit.
What to review
Half the diff is generated. Hand-written:
hack/generate-third-party-notices.shMakefile.github/workflows/golang.ymlversions.mk.gitignoreGenerated:
THIRD_PARTY_NOTICES.md(569 lines).hack/is new. The pin lives inversions.mk, which is this repo's existingversion mechanism, since there is no
tools.goor tools module here.How it works
make third-party-noticesrunshack/generate-third-party-notices.sh:./bin/go-licensesso the pinned version runsgo-licenses saveandcsvonce per platform, then mergemodule@versionfromvendor/modules.txtgo-licensescannot seemake check-third-party-noticesregenerates and diffs. It runs as a job ingolang.ymlon every build, with no changed-paths filter: the inventory is theimport closure of
./..., so it moves whenever an ordinary.gofile changesits imports, not only when
go.modorvendor/change.Implementation notes
./..., not./cmd/.... This is a library. Nothing releases abinary, so there is no shipped set to narrow to; the module itself is the
distributed artifact.
examples/is in scope. It has nogo.modof its own, so it lands ondisk for anyone running
go get, andmake buildalready builds it viago build ./.... Its closure is identical to the library's today, so includingit costs nothing and keeps the file correct if that changes.
CGO_ENABLED=1is set explicitly. Measured: with cgo off,go-nvml/pkg/dlleaves the graph andgo-licensesreportsgo-nvml/pkg/nvmlinstead ofgo-nvml/pkg. That is real host-dependence, nota theoretical one.
--ignore. It matches raw string prefixes,not path segments, so passing a stdlib list adds the bare token
goandsilently drops
golang.org/x/*,google.golang.org/*andgopkg.in/*.LC_ALL=Con every sort and grep.Whole-line
sort -urather thansort -t, -k1,1 -u. The awk counts instead ofusing
in, which mawk and BSD awk disagree on.grep -aso a NUL byte cannotchange the fence width.
mv, notcp, so an interrupted run cannot leave ahalf-written file.
Scope
Three third-party modules are linked:
go-nvlib,go-nvmlandgoogle/uuid.One bundled file needs naming.
vendor/github.com/NVIDIA/go-nvml/pkg/nvml/nvml.his the NVML API header copiedfrom the CUDA redistributable. It carries NVIDIA's own "NOTICE TO USER" terms
rather than go-nvml's Apache-2.0, and
go-licensescannot inspect it. Withouthandling, this file would have implied Apache-2.0 covers it. It now has its own
section.
cgo_helpers.his listed alongside it for completeness.Rather than a static list that rots, the script fails two ways: a declared file
that disappears, and any undeclared non-Go file appearing under an in-scope
vendored module.
testify,go-spew,go-difflibandyaml.v3are vendored for tests and arecorrectly absent, with no filter needed.
This repo has no Dockerfile and publishes no image, so there is no base image or
bundled system component to account for.
Shipping
Committed to the repo. Nothing about the module's build or contents changes.
Testing
e9b45c7c…,matching the committed file.
golang:1.24.4-bookworm, the imageversions.mkpins, on both linux/amd64 and linux/arm64./usr/bin/awkismawk there, so the license join is exercised on the awk that breaks the naive
form, against BWK awk on macOS.
BWK awk with identical output: a package carrying two licenses joins as
BSD-3-Clause / MPL-2.0with no leading separator and duplicates collapsed,a
=>replace resolves to the replacement'smodule@version, and areplace pointing at a local path exits 1.
go list -deps ./...over both platforms: 4 linkedthird-party packages, 3 index rows, 0 uncovered, 0 unused.
bundled-asset sections, 0
Unknown, 0 missing text, 0 unresolvedmodule@version.right message when stale and when untracked.
vendor/modules.txt, unreadablevendor/modules.txt,absent
go-licenses, a declared bundled asset that vanished, and an undeclaredone that appeared. Each exits non-zero with a clear message, leaves the
committed file untouched, and writes no partial file.
shellcheckclean.actionlintreports nothing on the new job thatit does not already report identically on the three existing ones.
make buildand
make testpass in the container.Note
make builddoes not run on macOS here, which predates this change:go-nvml/pkg/nvmlneeds cgo and Linux. Verification was done in the containerfor that reason.