pingcap / pingcap/tidb

compliance: add root third-party notices for Go dependencies

Open
#70,873 1 comment 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Background

Open-source license compliance requires the source repository itself to carry a complete, redistributable notice for the third-party components it bundles. Apache License 2.0 Section 4(d) requires attribution notices to be passed along with redistribution, and the notice must accurately reflect what is actually shipped. TiDB currently has no root notice file for its third-party Go dependencies.

## Goals

- Maintain a root `ThirdPartyNotices.txt` in the repository listing third-party components: names, versions, license identifiers, and license texts, so it can be redistributed with source bundles and release artifacts.
- The content must be traceable to a fixed source commit and fixed generation inputs (pinned tool version, audited overrides).
- Updates should be generated by an automated process (periodic, e.g. weekly) rather than manual editing, without blocking on dependency changes.

## Approach

- Collect components and license evidence from the dependency graph (`go list -deps ./...`), excluding the standard library and first-party modules.
- The generator is only responsible for discovering and extracting evidence; it does not decide legal matters. Cases it cannot decide (missing license metadata, unusual license choices) are handled by audited, exact-version overrides owned by humans. A renderer produces the final stable file; raw generator output is never used directly as the final notice.
- Components with unresolved evidence must be recorded explicitly for review, never silently dropped.

## Scope of this track

- PR https://github.com/pingcap/tidb/pull/70701 adds the first root third-party notices for this repository:
- Scope: Linux/amd64 `go list -deps ./...` with tests excluded; 308 components.
- Audited exact-version overrides cover `ngaut/*`, `endpoint-util`, `mathutil`, and an asset-level inventory for `appdash-data`.
- Follow-ups: wire the generation into a periodic CI job that opens update PRs, and keep the override/policy inputs versioned in the repository.

Contributor guide

Open the contributing guide

Research direction

Start by reading PR #70701 and the current dependency scope, then run `go list -deps ./...` with tests excluded to inspect the component set. Identify where the generator, audited exact-version overrides, renderer, and periodic update job should live. Done means reproducible inputs produce a reviewed root `ThirdPartyNotices.txt`, unresolved evidence is explicit, and updates can be automated.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ci-cd, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.