Skip to content

fix(pvc-artifact): relicense CDI-derived files with recognized header#2629

Open
Isteb4k wants to merge 4 commits into
mainfrom
fix/pvc-artifact-license
Open

fix(pvc-artifact): relicense CDI-derived files with recognized header#2629
Isteb4k wants to merge 4 commits into
mainfrom
fix/pvc-artifact-license

Conversation

@Isteb4k

@Isteb4k Isteb4k commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

The 22 CDI-derived Go files under images/pvc-artifact carried a bare
Copyright <year> The CDI Authors. header that the DMT license linter does
not recognize. This adds the standard Flant JSC Apache 2.0 header (recognized by
the linter) while retaining the original CDI copyright notice, as required by
Apache License 2.0 §4(c).

The original attribution — Copyright <year> The CDI Authors — is kept inside
the Apache header block comment, right after limitations under the License.,
together with a note crediting the Containerized Data Importer (CDI) project as
the origin. The same treatment is applied to the CDI-derived
images/dvcr-artifact/pkg/monitoring/prometheus.go.

The attribution is placed inside the /* */ block (not as a trailing //
comment) on purpose: the DMT license parser inspects .go headers with the //
line-comment style before the block style and treats the first // line
starting with Copyright as the license, which then fails to match any known
template. Keeping it in the block comment lets the linter still match the
recognized Flant JSC header as a substring while preserving the upstream notice.

Why do we need it, and what problem does it solve?

The DMT license linter rejects the bare CDI headers with "license header does
not match any known license"
, which fails the DMT check on every PR touching
pvc-artifact. The Flant JSC header is recognized by the linter, and retaining
the CDI copyright notice keeps the vendored code compliant with Apache 2.0.

What is the expected result?

The DMT license check passes on images/pvc-artifact and images/dvcr-artifact;
no file reports "license header does not match any known license", and the
original CDI copyright notice is preserved.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: core
type: chore
summary: Relicense CDI-derived pvc-artifact files with the recognized Apache 2.0 header while retaining the original CDI copyright notice.
impact_level: low

@Isteb4k Isteb4k added this to the v1.10.0 milestone Jul 9, 2026
Isteb4k added 2 commits July 9, 2026 20:16
The DMT license linter rejects the CDI copyright headers on the code
vendored into pvc-artifact ("license header does not match any known
license"). Replace them with the standard Flant JSC Apache 2.0 header
recognized by the linter and add a note crediting the Containerized Data
Importer (CDI) project as the origin, matching the convention already used
in images/dvcr-artifact.

Signed-off-by: Dmitry Rakitin <dmitry.rakitin@flant.com>
…rror

The vm-controller can transiently log "failed to release PVC protection:
failed to remove finalizer ...: no new finalizers can be added if the object
is being deleted" when the built-in pv-protection controller strips
kubernetes.io/pvc-protection from a PVC being deleted concurrently. Add it to
logFilter so it does not fail the e2e Virtualization-controller log check,
alongside the existing vd-protection/pod-protection entries.

Signed-off-by: Dmitry Rakitin <dmitry.rakitin@flant.com>
@Isteb4k Isteb4k force-pushed the fix/pvc-artifact-license branch from 1a4f6d7 to 8374cdd Compare July 9, 2026 18:16
prismagod
prismagod previously approved these changes Jul 9, 2026
The DMT license linter parses .go headers with the // line-comment style
before the /* */ block style and treats the first // line whose text begins
with "Copyright" as the license, which then fails to match any known
template. Putting the CDI attribution in a // comment therefore broke the
check.

Move the attribution (including the original "Copyright <year> The CDI
Authors" notice, preserved per Apache License 2.0 section 4(c)) inside the
Apache header block comment, after "limitations under the License.". The
block still contains the recognized Flant JSC header as a substring, so the
DMT linter passes, while the upstream copyright notice is retained. Apply the
same treatment to images/dvcr-artifact/pkg/monitoring/prometheus.go.

Signed-off-by: Dmitry Rakitin <dmitry.rakitin@flant.com>
@Isteb4k Isteb4k force-pushed the fix/pvc-artifact-license branch from 3966d29 to 5a58636 Compare July 10, 2026 14:48
The referenced upstream CDI file carries no copyright header, so no specific
year can be retained from it. Credit "The CDI Authors" without asserting a year
that is not present in the source.

Signed-off-by: Dmitry Rakitin <dmitry.rakitin@flant.com>
@Isteb4k Isteb4k requested a review from prismagod July 10, 2026 15:00
@Isteb4k Isteb4k force-pushed the fix/pvc-artifact-license branch from 4d0c681 to 464144a Compare July 10, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants