Contributing
Licensing rules, and what a change needs before it merges.
Licensing: Apache 2.0, clean room
Blockstor is Apache 2.0. Do not copy structure or code from GPL sources, in particular linstor-server and drbd-utils. You may read them to understand behaviour, never to reproduce how they are written.
Hard rules:
- No GPL-licensed spec files in the tree. LINSTOR’s
rest_v1_openapi.yamldeclares GPLv3, and code generated from it is a derivative work. - No code generated from a GPL source by any tool.
- No Go dependency under GPL, AGPL, LGPL or SSPL. CI enforces this through
license-check.yml, which runsgo-licenses check --disallowed_types=forbidden,restrictedover./cmd/.... That is a denylist: it fails on licensesgo-licensesclassifies as forbidden or restricted, and lets everything else through, so check a new dependency’s license yourself. - Every Go source file carries an
SPDX-License-Identifier: Apache-2.0header.
Apache-2.0 projects that are safe to study and depend on: golinstor, the authoritative description of the REST wire shape; piraeus-operator; linstor-csi; drbd-reactor; and the public DRBD 9 documentation and man pages.
When in doubt, work clean room: one person reads the GPL source and writes a behavioural spec, and another implements it without seeing the original.
Before you open a pull request
go test ./...passes andmake lintis clean.- A bug fix comes with a test at the lowest tier that catches it. A bug in the operator CLI also gets a cell in
tests/e2e/cli-matrix/. - A new CLI verb or a change to a wire shape is checked with the parity refresh, and an intended difference from upstream gets a row in
docs/cli-parity-known-deltas.md. - User-facing behaviour is documented on this site, under
site/content/en/docs/. - Commits follow Conventional Commits and are signed off (
git commit --signoff).