Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

ks param set incorrectly matches float (even with --as-string) #509

@e-zhang

Description

@e-zhang

Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug

What happened:
When trying to set a param for a semver version, ks param set returns an error for strconv.ParseFloat invalid float. Looks like the regex pattern for float matches repeated periods ((\.[0-9]+)*).
When trying with the --as-string flag, same error is thrown. It looks like the asString flag is not preserved in the EnvParamSet.

ERROR set params: strconv.ParseFloat: parsing "0.0.1": invalid syntax

What you expected to happen:
Set param correctly as string

How to reproduce it (as minimally and precisely as possible):
ks param set <component> <param> 0.0.1
ks param set <component> <param> 0.0.1 --as-string

Anything else we need to know?:
Regression in 0.10.1, works in 0.10.0.

Environment:

  • ksonnet version (use ks version): 0.10.1
  • Kubernetes version (use kubectl version): 1.9.4

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