lima-vm / lima-vm/lima

Call `limadriver.Validate` as part of `limayaml.Validate`

Open
#2,512 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

> They can return errors in validation, instead of warnings?

@afbjorklund Yes, they can. The warning comes from `func (l *LimaVzDriver) Validate() error {` and just write to the log, but don't return an error:

https://github.com/lima-vm/lima/blob/374db8bb91ecd8a3e78bb8d48351fd05e2fa2214/pkg/vz/vz_driver_darwin.go#L134-L139

I think all the warning should return an error instead (but in a separate PR).

I also think `limaDriver.Validate()` should be called as part of `limayaml.Validate()` or through some wrapper that will call both. Calling it as part of `instance.Prepare()` is too late.

_Originally posted by @jandubois in https://github.com/lima-vm/lima/pull/1951#discussion_r1690851617_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.