[dmt] require disable.message fallback for disable.messages on Deckhouse < 1.77#417
Open
Fkuloff wants to merge 1 commit into
Open
[dmt] require disable.message fallback for disable.messages on Deckhouse < 1.77#417Fkuloff wants to merge 1 commit into
Fkuloff wants to merge 1 commit into
Conversation
Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
25be917 to
a9b7f64
Compare
ldmonster
approved these changes
Jul 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the module linter’s definition-file rule to enforce correct usage of disable.messages vs disable.message depending on the module’s supported Deckhouse versions, ensuring pre-1.77 compatibility is handled explicitly.
Changes:
- Enforce a
disable.messagefallback whendisable.messagesis used butrequirements.deckhousestill allows< 1.77, and error ondisable.messagewhen pinned to>= 1.77. - Refresh unit tests and e2e fixtures to cover the new error/warn matrix, and remove the old “disable-message-deprecated” fixture.
- Update module linter documentation and e2e case list to reflect the new rules.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/testdata/module/disable-messages-invalid/expected.yaml | Updates expected errors to match new “missing fallback on <1.77” behavior. |
| test/e2e/testdata/module/disable-message-on-supported-version/module/openapi/values.yaml | Adds minimal OpenAPI scaffold for the new e2e fixture. |
| test/e2e/testdata/module/disable-message-on-supported-version/module/openapi/config-values.yaml | Adds minimal OpenAPI schema for the new e2e fixture. |
| test/e2e/testdata/module/disable-message-on-supported-version/module/module.yaml | Pins fixture to >= 1.77 to exercise the “disable.message must be removed” error. |
| test/e2e/testdata/module/disable-message-on-supported-version/expected.yaml | New e2e expectation for the disable.message removal error on >= 1.77. |
| test/e2e/testdata/module/disable-message-fallback/module/openapi/values.yaml | Adds/updates minimal OpenAPI scaffold for the fallback warning fixture. |
| test/e2e/testdata/module/disable-message-fallback/module/openapi/config-values.yaml | Adds/updates minimal OpenAPI schema for the fallback warning fixture. |
| test/e2e/testdata/module/disable-message-fallback/module/module.yaml | New fixture covering disable.message + disable.messages on < 1.77 (warning). |
| test/e2e/testdata/module/disable-message-fallback/expected.yaml | New e2e expectation for the fallback warning. |
| test/e2e/testdata/module/disable-message-deprecated/expected.yaml | Removes the obsolete “disable.message deprecated” e2e expectation. |
| test/e2e/README.md | Updates the catalog of e2e cases to reflect new fixtures and removed one. |
| pkg/linters/module/rules/module_yaml.go | Implements the updated version-aware validation logic for disable messaging fields. |
| pkg/linters/module/rules/module_yaml_test.go | Updates/extends unit tests to cover new behaviors and messages. |
| pkg/linters/module/README.md | Documents the updated rule behavior and severities. |
Comments suppressed due to low confidence (1)
test/e2e/testdata/module/disable-message-on-supported-version/module/module.yaml:8
- The fixture’s description still says it verifies a deprecation lint, but in this PR
disable.messageonrequirements.deckhouse: ">= 1.77"is enforced as an error requiring removal. Updating the fixture description will keep the testdata self-explanatory and aligned with the new rule.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Makes the
definition-filerule (module linter) enforce thedisable.messages/disable.messagesplit by Deckhouse version:disable.messages(localizedru/en) is read by Deckhouse>= 1.77, whiledisable.messageis what< 1.77reads.Rules:
disable.messagesmust define bothruanden— otherwise an error.disable.messageson a module that allows Deckhouse< 1.77needs adisable.messagefallback (orrequirements.deckhousepinned to>= 1.77) — otherwise an error (< 1.77does not readdisable.messages).disable.messageon a module pinned to Deckhouse>= 1.77must be removed (onlydisable.messagesis read there) — otherwise an error.disable.messagekept alongsidedisable.messageswhile the module still allows< 1.77— a warning: it is the< 1.77fallback and must be removed oncerequirements.deckhouseis pinned to>= 1.77.disable.messageon a module that allows< 1.77is the correct field — no finding.Follow-up to #411.