Skip to content

Validate yaml compatibility with v0.x#303

Merged
kke merged 5 commits intomainfrom
yaml-compat
Mar 26, 2026
Merged

Validate yaml compatibility with v0.x#303
kke merged 5 commits intomainfrom
yaml-compat

Conversation

@kke
Copy link
Copy Markdown
Contributor

@kke kke commented Mar 25, 2026

Includes minor fixes to compatibility issues that were found and a full set of tests to validate that the compatibility isn't broken. Having the identical YAML "API" is essential for k0sctl rig v0.x to v2 migration.

The rig v2 API itself isn't released and isn't in use anywhere so breaking the API otherwise is still fine. (<-- hint to copilot).

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on maintaining rig v2’s YAML/config compatibility with rig v0.x to support migration, including adding test coverage to prevent regressions.

Changes:

  • Add LocalhostConfig YAML unmarshalling support for both localhost: true (v2) and localhost: { enabled: true } (v0.x).
  • Introduce a comprehensive CompositeConfig YAML compatibility test suite, including inline-embedding cases.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
compositeconfig.go Introduces LocalhostConfig with custom YAML unmarshalling and updates CompositeConfig to use it.
compositeconfig_test.go Adds extensive YAML compatibility tests and documents embedding patterns/limitations.

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

Includes minor fixes to found compatibility problems and a full set of
tests to validate that the compatibility isn't broken.

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


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

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


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

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


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

Signed-off-by: Kimmo Lehto <klehto@mirantis.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


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

@kke kke marked this pull request as ready for review March 26, 2026 12:25
@kke kke merged commit 3603cb0 into main Mar 26, 2026
15 checks passed
@kke kke deleted the yaml-compat branch March 26, 2026 12:26
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