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

Un-deprecate non-strict YAML #3104

Merged
merged 1 commit into from
Jan 10, 2025
Merged

Conversation

jandubois
Copy link
Member

@jandubois jandubois commented Jan 9, 2025

We still warn the user because it could be due to typos, but we no longer threaten to make strict mode the default.

Allowing non-strict YAML is very useful for maintainers switching between feature branches. Failing on non-strict YAML would make it hard to e.g. delete instances that have been created by a different branch that introduces a new field.

AkihiroSuda
AkihiroSuda previously approved these changes Jan 9, 2025
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 ...

@jandubois
Copy link
Member Author

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

Yeah, I was thinking the same thing this morning; it is an inconvenience for maintainers.

So let's just remove the deprecation message, but keep it as a warning only.

We still warn the user because it could be due to typos, but we no longer
threaten to make strict mode the default.

Allowing non-strict YAML is very useful for maintainers switching between
feature branches. Failing on non-strict YAML would make it hard to e.g.
delete instances that have been created by a different branch that introduces
a new field.

Signed-off-by: Jan Dubois <[email protected]>
@jandubois jandubois changed the title Enforce strict-YAML mode for lima.yaml Un-deprecate non-strict YAML Jan 10, 2025
@jandubois jandubois requested a review from AkihiroSuda January 10, 2025 17:32
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

@jandubois jandubois merged commit 9c629ea into lima-vm:master Jan 10, 2025
29 checks passed
@jandubois jandubois deleted the yaml-strict branch January 10, 2025 19:34
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