Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce strict-YAML mode for lima.yaml #3104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jandubois
Copy link
Member

@jandubois jandubois commented Jan 9, 2025

Don't allow duplicate fields, or fields not defined in our schema.

Rancher Desktop hasn't used non-strict YAML in over 2 years; this has been fixed in rancher-sandbox/rancher-desktop#2898

Users have the option of storing custom data in params now (and could have used obscure env names even before).

Don't allow duplicate fields, or fields not defined in our schema.

Signed-off-by: Jan Dubois <[email protected]>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

Thanks, but this might be considered as a breaking change

@AkihiroSuda AkihiroSuda requested a review from a team January 9, 2025 23:30
@jandubois
Copy link
Member Author

jandubois commented Jan 10, 2025

Thanks, but this might be considered as a breaking change

It is, but it has been deprecated for over 2 years now (since 0.12.0), and issuing a warning for over 2 years: #1045.

So yes, it should be mentioned in the release notes. But if we never want to remove it, then we should maybe get rid of the deprecation warning and just print the non-strict YAML errors.

@afbjorklund
Copy link
Member

For me it is quite normal to get warnings, when switching between alternative futures and the release version.

WARN[0000] Non-strict YAML is deprecated and will be unsupported in a future version of Lima  comment="main file \"/home/anders/.lima/raspberrypi/lima.yaml\"" error="[14:3] unknown field \"address\"\n  11 |   writable: true\n  12 | \n  13 | ssh:\n> 14 |   address: raspberrypi.local\n         ^\n  16 | provision:\n  17 | - mode: system\n  18 |   "
WARN[0000] Unknown driver: ext                          
WARN[0000] instance "raspberrypi" has errors             errors="[field `vmType` must be \"qemu\", \"vz\", \"wsl2\"; got \"ext\"]"

If these are changed from warnings to errors, I would need to use a separate LIMA_HOME for experimenting...

Which is "OK", I suppose. Can't say that it hasn't warned :-)

... will be unsupported in a future version ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants