CircleCI-Public / CircleCI-Public/circleci-cli
`circleci orb validate` gives the same misleading error message when `parameters` is mispelled as (seemingly) any 10 character word
- Dominant language
- Go
- Stars
- 459
- Forks
- 255
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 59
Description
## Meta:
**CircleCI CLI Version:**
```
$ circleci version
0.1.19293+897ebaf (release)
```
**Operating System:**
```
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
```
**CircleCI CLI Diagnostic:**
```
$ circleci diagnostic
---
CircleCI CLI Diagnostics
---
Debugger mode: false
Config found: /home/brandon/.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:
I've mispelled `<< parameters.modules >>`, for example `<< paramaters.modules >>`, somewhere in my orb's definition.
```
Error: Error calling command: 'filter'
Unknown variable(s): modules
Error calling job: 'continue'
Error calling command: 'filter'
Unknown variable(s): modules
```
Now, I've purposely misspelled it a 10 character string `<< aaaaaaaaaa.modules >>`:
```
Error: Error calling command: 'filter'
Unknown variable(s): modules
Error calling job: 'continue'
Error calling command: 'filter'
Unknown variable(s): modules
```
It produces the same output.
## Expected behavior:
Ideally, it tells me `aaaaaaaaa` isn't a valid attribute or reference? It took me all of 30 minutes to track down that it wasn't an error related to a missing parameter altogether, but rather that I'd misspelled `parameters` as `paramaters` somewhere in my orb.
## When did this begin / Was this previously working?:
Seems to be happening on the latest release? I've just noticed this, so I'm not sure how long.
## Additional Information:
N/A - you can try this on any orb, I'm sure.
Contributor guide
Research direction
Reproduce the report with `circleci orb validate`, comparing `<< parameters.modules >>`, the misspelled `<< paramaters.modules >>`, and a 10-character identifier. Trace the validation path that emits “Unknown variable(s): modules”; done when invalid references produce an accurate diagnostic that distinguishes the misspelled root from a missing parameter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100