[dmt] feat: validate module changelog files - #476
Merged
Conversation
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
fuldaxxx
force-pushed
the
feat/changelog-bundle-scope
branch
from
September 8, 2026 09:22
cac0f77 to
30853cf
Compare
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
Signed-off-by: Ruslan Gorbunov <ruslan.gorbunov@flant.com>
fuldaxxx
marked this pull request as ready for review
September 8, 2026 13:31
ldmonster
approved these changes
Sep 8, 2026
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.
Description
releaseandbundlescopes. The source tree is no longer checked forchangelog.yaml.documentation/changelogrule is replaced by two module rules:has-changelog— the published image carries achangelog.yamland it is not empty;changelog-valid— that file parses as YAML; stays quiet when the file is absent. Both report atwarninstead oferror.bundle-layoutnow requireschangelog.yaml: the file ships in the bundle image, not only in the sibling release image, as the earlier comment assumed.documentation.rules.changelogis gone;module.rules.has-changelogandmodule.rules.changelog-validtake its place. A config that still sets the old key loses that setting silently.pkg.RepositoryOriginURLandpkg.IsDeckhouseRepo. Three copies ofgetModuleNameFromRepository/getGitConfigFile/convertURLToModuleName(module linter, templates registry rule, metrics) are deleted, and the exported globalpkg.IgnoreDeckhouseReposListis now a local list behindIsDeckhouseRepo. A module linted from inside the Deckhouse monorepo keeps the same exemptions it had before.What the new findings look like:
Why do we need it, and what problem does it solve?
Deckhouse renders release notes from
changelog.yamlin the published images. A file that is missing, empty, or unparseable means the release lands with nothing to show for it, and nothing between the build and the registry catches that — the gap only becomes visible when someone opens the release page.The old
documentation/changelogrule checked the wrong place: it ran over the module source tree, where the file's presence proves nothing about what got published, and it never looked inside the file, so achangelog.yamlthat fails to parse passed the linter. It also assumed the changelog ships only in the release image, which is whybundle-layoutdid not ask for it — the published CE bundles do carry it.Moving the checks into the
releaseandbundlescopes puts them on the artifacts that are actually consumed, and splitting presence from validity keeps one missing file from producing three findings — the splitdefinition-fileandpackage-yamlalready follow. Severity iswarnrather thanerror: this catches existing modules mid-flight, and achangelog problem should not fail a lint run that is otherwise clean.
Modules built into the Deckhouse monorepo need no exemption: they publish no images of their own, so neither scope ever runs over them.
The repository-detection cleanup came out of the same work — the changelog rules needed to know whether a module comes from the monorepo, and the answer lived in three copied private helpers plus an exported mutable global. One function, one list, one place to change when the list of monorepo checkouts changes.