Skip to content

[dmt] deprecate disable.message in module.yaml in favor of disable.messages#411

Open
Fkuloff wants to merge 1 commit into
mainfrom
feature/module-yaml-disable-messages-lint
Open

[dmt] deprecate disable.message in module.yaml in favor of disable.messages#411
Fkuloff wants to merge 1 commit into
mainfrom
feature/module-yaml-disable-messages-lint

Conversation

@Fkuloff

@Fkuloff Fkuloff commented Jun 25, 2026

Copy link
Copy Markdown

Description

The definition-file rule (module linter) now flags the deprecated singular disable.message field in module.yaml and points authors to the localized disable.messages (ru/en) instead — mirroring the existing descriptiondescriptions.en deprecation (error for external modules, warning for in-repo Deckhouse modules). Deckhouse added disable.messages.{ru,en} so the console can render the disable-confirmation warning in the user's locale; the old disable.message is being phased out, and this lint forces module authors to migrate.

@Fkuloff Fkuloff marked this pull request as draft June 25, 2026 11:54
@Fkuloff Fkuloff self-assigned this Jun 25, 2026
@Fkuloff Fkuloff requested review from ipaqsa and ldmonster June 25, 2026 11:54
@Fkuloff Fkuloff marked this pull request as ready for review June 25, 2026 12:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the definition-file module linter to treat disable.message in module.yaml as deprecated and instruct authors to migrate to localized disable.messages (en/ru), consistent with the existing descriptiondescriptions.en deprecation flow.

Changes:

  • Extends the DeckhouseModule YAML schema model with a disable section (ModuleDisable, ModuleDisableMessages).
  • Adds a lint error/warning when deprecated disable.message is used, pointing to disable.messages with ru/en.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +298 to +300
if yml.Disable != nil && yml.Disable.Message != "" {
errorList.WithMaxLevel(maxLevel).Error("Field 'disable.message' is deprecated, use 'disable.messages' (with 'ru'/'en') instead")
}
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.

3 participants