Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ban duplicate keys in parameter files #126

Open
jamart28 opened this issue Mar 3, 2020 · 2 comments
Open

Ban duplicate keys in parameter files #126

jamart28 opened this issue Mar 3, 2020 · 2 comments
Assignees
Labels
bug Something isn't working waiting

Comments

@jamart28
Copy link
Collaborator

jamart28 commented Mar 3, 2020

  root_level: DEBUG
  root_level: INFO

The above is currently allowed as YAML libraries handle duplicates differently, some allowing and some not. Instead this should be checked for and disallowed. Most likely duplicates will have to be checked manually something like the following: https://gist.github.com/pypt/94d747fe5180851196eb.

@jamart28
Copy link
Collaborator Author

jamart28 commented Mar 3, 2020

Doing more research, there are plenty of workarounds, although I'm not sure where they should be implemented in our code since it involves changing the behavior of yaml.safe_load() (though that is no really an issue as a place can be found in the many workarounds). However, it looks like PyYAML has actually begun working to correct this divergence from the YAML standard: yaml/pyyaml#165. As such do we want to implement a workaround for now and take it out after their fix goes live or wait for their fix? Currently, the halt in work comes from keeping implementation of merging while disallowing duplicates. @gabbard @berquist

@gabbard
Copy link

gabbard commented Mar 3, 2020

@jamart28 : Let's hold off on this awaiting the upstream fix.

@gabbard gabbard added waiting bug Something isn't working labels Mar 3, 2020
@jamart28 jamart28 self-assigned this Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting
Projects
None yet
Development

No branches or pull requests

2 participants