cloudfoundry / cloudfoundry/cloud_controller_ng
Errors v2.yml contains duplicate keys
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 207
- Forks
- 373
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 56
Description
Issue
errors/v2.yml contains two duplicate keys:
Both of the above are defined twice and with different names and messages in the v2.yml file. The results could vary depending on how the yaml document is unmarshalled.
Context
go-cfclient uses the v2.yml to generate error info
Steps to Reproduce
In go-cfclient attempt to upgrade to gopkg.in/yaml.v3, run make generate
Expected result
The v2.yml document unmarshals fine.
Current result
gen_error.go:49: yaml: unmarshal errors:
line 221: mapping key "60003" already defined at line 216
line 1031: mapping key "290013" already defined at line 1021
Possible Fix
Remove the duplicate key keeping only one. Likely for backwards compatibility it would need to be whatever the Ruby yaml parser keeps.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect errors/v2.yml at the cited entries for keys 60003 and 290013, then check which duplicate definition the Ruby YAML parser retains for backwards compatibility. Run go-cfclient's make generate command to verify the document unmarshals without duplicate-key errors and each key is defined only once.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, yaml
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100