Skip to content

Reject shrinking disk during YAML validation #3596

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions cmd/limactl/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"github.com/lima-vm/lima/cmd/limactl/editflags"
"github.com/lima-vm/lima/pkg/editutil"
"github.com/lima-vm/lima/pkg/instance"
"github.com/lima-vm/lima/pkg/limayaml"

Check failure on line 19 in cmd/limactl/edit.go

View workflow job for this annotation

GitHub Actions / Lint Go (macos-15)

could not import github.com/lima-vm/lima/pkg/limayaml (-: # github.com/lima-vm/lima/pkg/limayaml
networks "github.com/lima-vm/lima/pkg/networks/reconcile"
"github.com/lima-vm/lima/pkg/store"
"github.com/lima-vm/lima/pkg/store/filenames"
Expand Down Expand Up @@ -118,13 +118,13 @@
return err
}
if err := limayaml.Validate(y, true); err != nil {
rejectedYAML := "lima.REJECTED.yaml"
if writeErr := os.WriteFile(rejectedYAML, yBytes, 0o644); writeErr != nil {
return fmt.Errorf("the YAML is invalid, attempted to save the buffer as %q but failed: %w: %w", rejectedYAML, writeErr, err)
}
// TODO: may need to support editing the rejected YAML
return fmt.Errorf("the YAML is invalid, saved the buffer as %q: %w", rejectedYAML, err)
return saveRejectedYAML(yBytes, err)
}

if err := limayaml.ValidateYAMLAgainstLatestConfig(yBytes, yContent); err != nil {
return saveRejectedYAML(yBytes, err)
}

if err := os.WriteFile(filePath, yBytes, 0o644); err != nil {
return err
}
Expand Down Expand Up @@ -171,3 +171,13 @@
func editBashComplete(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
return bashCompleteInstanceNames(cmd)
}

// saveRejectedYAML writes the rejected config and returns an error.
func saveRejectedYAML(y []byte, origErr error) error {
rejectedYAML := "lima.REJECTED.yaml"
if writeErr := os.WriteFile(rejectedYAML, y, 0o644); writeErr != nil {
return fmt.Errorf("the YAML is invalid, attempted to save the buffer as %q but failed: %w", rejectedYAML, errors.Join(writeErr, origErr))
}
// TODO: may need to support editing the rejected YAML
return fmt.Errorf("the YAML is invalid, saved the buffer as %q: %w", rejectedYAML, origErr)
}
34 changes: 34 additions & 0 deletions pkg/limayaml/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -595,3 +595,37 @@
logrus.Warn("`mountInotify` is experimental")
}
}

// ValidateYAMLAgainstLatestConfig validates the values between the latest YAML and the updated(New) YAML.
func ValidateYAMLAgainstLatestConfig(yNew, yLatest []byte) error {
Copy link
Member

Choose a reason for hiding this comment

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

Let's cover this function with unit tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On it!.

var l, n LimaYAML
var err error
if err = Unmarshal(yLatest, &l, "Unmarshal latest YAML bytes"); err != nil {
return err
}
if err = Unmarshal(yNew, &n, "Unmarshal new YAML bytes); err != nil {

Check failure on line 606 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Colima tests (QEMU, Linux host) (v0.6.5)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 606 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Colima tests (QEMU, Linux host) (v0.6.5)

newline in string
return err

Check failure on line 607 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Colima tests (QEMU, Linux host) (v0.6.5)

syntax error: unexpected keyword return, expected {
}

Check failure on line 608 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Colima tests (QEMU, Linux host) (v0.6.5)

syntax error: unexpected }, expected expression

// Handle editing the template without a disk value
if n.Disk == nil || l.Disk == nil {
return nil
}

// Disk value must be provided, as it is required when creating an instance.
nDisk, err := units.RAMInBytes(*n.Disk)
if err != nil {
return err
}
lDisk, err := units.RAMInBytes(*l.Disk)
if err != nil {

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Lint Go (macos-15)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Lint Go (macos-15)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Lint Go (macos-15)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Lint Go (macos-15)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/alpine-iso-9p-writable.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/alpine-iso-9p-writable.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/net-user-v2.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/net-user-v2.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/test-misc.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/test-misc.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (alpine.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (alpine.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (fedora-42.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (fedora-42.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (opensuse.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (opensuse.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (docker.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (docker.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (ubuntu-25.04.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (ubuntu-25.04.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (debian.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (debian.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (fedora.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (fedora.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (archlinux.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (archlinux.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Smoke tests (QEMU, old Linux host)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Smoke tests (QEMU, old Linux host)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Vulncheck

missing ',' before newline in argument list

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Vulncheck

string literal not terminated

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Unit tests (1.23.x)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Unit tests (1.23.x)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Cross-compile (NetBSD, DragonFlyBSD)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Cross-compile (NetBSD, DragonFlyBSD)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / VMNet tests (QEMU)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / VMNet tests (QEMU)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Artifacts Darwin

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Artifacts Darwin

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / gomodjail (experimental; failures shall not block merging PRs)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / gomodjail (experimental; failures shall not block merging PRs)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (vz) (default.yaml)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (vz) (default.yaml)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Unit tests (1.24.x)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Unit tests (1.24.x)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Windows tests (QEMU)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Windows tests (QEMU)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Windows tests (WSL2)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Windows tests (WSL2)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, macOS host)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, macOS host)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Upgrade tests (QEMU, macOS host) (v0.15.1)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Upgrade tests (QEMU, macOS host) (v0.15.1)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Upgrade tests (QEMU, macOS host) (v0.15.1)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Upgrade tests (QEMU, macOS host) (v0.15.1)

newline in string

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Upgrade tests (QEMU, macOS host) (v0.15.1)

syntax error: unexpected newline in argument list; possibly missing comma or )

Check failure on line 621 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Upgrade tests (QEMU, macOS host) (v0.15.1)

newline in string
return err

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Lint Go (macos-15)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Lint Go (macos-15)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/alpine-iso-9p-writable.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/net-user-v2.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/test-misc.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (alpine.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (fedora-42.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (opensuse.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (docker.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (ubuntu-25.04.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (debian.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (fedora.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (archlinux.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Smoke tests (QEMU, old Linux host)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Vulncheck

missing ',' before newline in argument list

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Vulncheck

missing ',' in argument list

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Vulncheck

expected operand, found 'return'

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Unit tests (1.23.x)

syntax error: unexpected return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Cross-compile (NetBSD, DragonFlyBSD)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / VMNet tests (QEMU)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Artifacts Darwin

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / gomodjail (experimental; failures shall not block merging PRs)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (vz) (default.yaml)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Unit tests (1.24.x)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Windows tests (QEMU)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Windows tests (WSL2)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, macOS host)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Upgrade tests (QEMU, macOS host) (v0.15.1)

syntax error: unexpected keyword return, expected {

Check failure on line 622 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Upgrade tests (QEMU, macOS host) (v0.15.1)

syntax error: unexpected keyword return, expected {
}

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Lint Go (macos-15)

syntax error: unexpected }, expected expression) (typecheck)

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Lint Go (macos-15)

syntax error: unexpected }, expected expression) (typecheck)

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/alpine-iso-9p-writable.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/net-user-v2.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (../hack/test-templates/test-misc.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (alpine.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (fedora-42.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (opensuse.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (docker.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (ubuntu-25.04.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (debian.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (fedora.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, Linux host) (archlinux.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Smoke tests (QEMU, old Linux host)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Vulncheck

expected operand, found '}'

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Unit tests (1.23.x)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Cross-compile (NetBSD, DragonFlyBSD)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / VMNet tests (QEMU)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Artifacts Darwin

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / gomodjail (experimental; failures shall not block merging PRs)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (vz) (default.yaml)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Unit tests (1.24.x)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Windows tests (QEMU)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Windows tests (WSL2)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Integration tests (QEMU, macOS host)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Upgrade tests (QEMU, macOS host) (v0.15.1)

syntax error: unexpected }, expected expression

Check failure on line 623 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Upgrade tests (QEMU, macOS host) (v0.15.1)

syntax error: unexpected }, expected expression

// Reject shrinking disk
if nDisk < lDisk {

Check failure on line 626 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Vulncheck

missing ',' in argument list
return fmt.Errorf("field `disk`: shrinking the disk (%v --> %v) is not supported", *l.Disk, *n.Disk)

Check failure on line 627 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Vulncheck

missing ',' before newline in composite literal

Check failure on line 627 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Vulncheck

missing ',' in composite literal

Check failure on line 627 in pkg/limayaml/validate.go

View workflow job for this annotation

GitHub Actions / Vulncheck

expected operand, found 'return'
}

return nil
}
Loading