CircleCI-Public / circleci-cli

Use CircleCI from the command line
https://circleci-public.github.io/circleci-cli/
MIT License
406 stars 234 forks source link

validate config Pipeline.number data type is wrong #483

Open legopin opened 3 years ago

legopin commented 3 years ago

Meta:

CircleCI CLI Version: 0.1.10583+79ecb9b (homebrew)

Operating System: macOS 10.15.7

CircleCI CLI Diagnostic:

---
CircleCI CLI Diagnostics
---
Debugger mode: false
Config found: /Users/seanyuan/.circleci/cli.yml
API host: https://circleci.com
API endpoint: graphql-unstable
Error: please set a token with 'circleci setup'
You can create a new personal API token here:
https://circleci.com/account/api

Current behavior:

When executing circlecli validate config on a config file using pipeline parametes, the CLI throws error: Type error for argument PIPELINE_NUMBER: expected type: integer, actual value: "1" (type string)

Expected behavior:

The default pipeline params provided for validation should match actual data. Pipeline.numbers should be type integer

on cloud server execution, pipeline.number is integer Screen Shot 2020-10-06 at 5 17 58 PM

On documentation it is also recorded number is an integer https://circleci.com/docs/2.0/pipeline-variables/#pipeline-values Screen Shot 2020-10-06 at 5 05 36 PM

When did this begin / Was this previously working?:

Not previously working

Additional Information:

Found the location of the default value, but since I'm unfamiliar with GO, not sure how to change this string map https://github.com/CircleCI-Public/circleci-cli/blob/797fc6533c09060e0cbe1b7ae08054ed487a4524/pipeline/pipeline.go#L31-L40

legopin commented 3 years ago

@cayennes Could someone take a look at this?

legopin commented 3 years ago

Issue persists in circleci version 0.1.11508+10b61a8 (homebrew)

keymastervn commented 3 years ago

I think I will take a look at the validate command, 0.1.15224+605a617 (homebrew) is getting the same issue