镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fly config validate reports an invalid [[vm]] memory value as valid #5262

Open

Description

@RaphaelFakhri

Describe the bug

fly config validate accepts a config whose machine conversion fails, such as an unparsable memory value in a [[vm]] section. The command prints "Configuration is valid", and the error appears only later, when fly deploy converts the config to a machine config.

Steps to reproduce

  1. Create a fly.toml with:

    app = "foo"
    
    [[vm]]
      memory = "not-a-size"
  2. Run fly config validate.

Expected

Validation fails and reports that converting to a machine in process group app will fail, with the parse error.

Actual

✓ Configuration is valid

The cause is in validateMachineConversion in internal/appconfig/validation.go. It checks the named return value err, which is always nil at that point, instead of the error returned by ToMachineConfig.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions