Skip to content

[dmt] require x-config-version when conversions exist#367

Draft
diyliv wants to merge 1 commit into
mainfrom
fix/x-config-version-must-set
Draft

[dmt] require x-config-version when conversions exist#367
diyliv wants to merge 1 commit into
mainfrom
fix/x-config-version-must-set

Conversation

@diyliv
Copy link
Copy Markdown
Contributor

@diyliv diyliv commented May 19, 2026

Summary

  • Lint rule (conversions.go): when openapi/conversions/ directory exists with valid conversion files but openapi/config-values.yaml has no x-config-version, dmt now reports an error instead of silently passing. Also checks that x-config-version matches the latest conversion version.
  • Tester (tester.go): the conversion tester now reports an error when conversions exist but x-config-version is 0, instead of returning "not applicable".
  • Tests: added unit tests for both the lint rule and tester covering all scenarios.

Context

When a module has conversion files but x-config-version is missing from config-values.yaml, the Deckhouse platform cannot generate the ModuleSettingsDefinition with schemas for all versions — the UI shows no configuration form for the module. See deckhouse/sds-replicated-volume#680 for a concrete example.

Example

Module with openapi/conversions/v2.yaml but openapi/config-values.yaml missing x-config-version:

# openapi/config-values.yaml — no x-config-version field
type: object
properties:
  dataNodes:
    type: object
# ...
# openapi/conversions/v2.yaml exists
version: 2
conversions:
  - del(.enableThinProvisioning)

Before: dmt lint passes silently, dmt test conversions skips the module.

After: dmt lint errors:

x-config-version is not set in config-values.yaml, but conversions exist

dmt test conversions errors with the same message.

@diyliv diyliv self-assigned this May 19, 2026
@diyliv diyliv added bug Something isn't working go Pull requests that update go code labels May 19, 2026
@diyliv diyliv force-pushed the fix/x-config-version-must-set branch from 6c9e6f2 to d849c11 Compare May 19, 2026 18:51
@diyliv diyliv marked this pull request as draft May 19, 2026 19:03
@diyliv diyliv force-pushed the fix/x-config-version-must-set branch from d849c11 to 22dfdb4 Compare May 20, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant