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

Can't set the same key twice #41

Open
iawells opened this issue May 6, 2013 · 15 comments
Open

Can't set the same key twice #41

iawells opened this issue May 6, 2013 · 15 comments
Labels

Comments

@iawells
Copy link

iawells commented May 6, 2013

If I want the same key twice in an ini file (which is not, I think, a general property of ini files, but one that Openstack nevertheless uses for certain types), I can't. Can I suggest we use something of the form: value => ['a', 'b', 'c'] ?

(reported via Dan a few weeks ago, but it's not a bug here, so I'm being tidy)

@cprice404
Copy link

I have misgivings about this one. I'm thrilled that this module has come in handy for openstack, but it's intended to be a really general-purpose module, and I feel a little weird about the idea of adding a feature that explicitly breaks the most-generally-agreed-upon definition of what is and isn't legal in an INI file. I also think that the implementation of this is likely to be fairly ugly. I thought that I'd convinced @bodepd that this didn't seem like a great idea :)

@iawells
Copy link
Author

iawells commented May 6, 2013

He neglected to inform me of that.

The nice thing about it as suggested is its backward compatible but I sympathise with making the code icky.

@cprice404
Copy link

Yeah, and to be clear I'm not saying "there is no way we should consider this"... just that my initial instinct is against it.

@fcharlier
Copy link

Hi, I'm currently trying to implement this feature as OpenStack's Ceilometer requires such a config value. I'll propose the eventual implementation here as soon as I have something working and not breaking the current features.

@bodepd
Copy link

bodepd commented Aug 28, 2013

@fcharlier did you ever get a patch working for this?

@fcharlier
Copy link

@bodepd unfortunately I didn't manage to get something to work properly and not break compatibility.

@igalic
Copy link
Contributor

igalic commented Oct 11, 2013

@fcharlier how does the thing that breaks compatibility look like?

@fcharlier
Copy link

@igalic I had at the time managed to get/set keys with multiple values where values were arrays, but I didn't manage to have keys having values using strings & keys having multipe values using arrays.

I also had some problems removing values from multiple-valued keys ...

@chelnak
Copy link
Contributor

chelnak commented Mar 8, 2022

Hello! We are doing some house keeping and noticed that this issue has been open for a long time.

We're going to close it but please do raise another issue if the issue still persists. 😄

@chelnak chelnak closed this as completed Mar 8, 2022
@kenyon
Copy link

kenyon commented Mar 9, 2022

This still persists and would be nice to have. Please reopen, @chelnak.

For example, git's style of ini files allows multiple entries with the same key, so you can't use this module to manage them, have to use exec workarounds.

Same bug report: https://tickets.puppetlabs.com/browse/MODULES-5012

@ekohl ekohl linked a pull request Jun 13, 2022 that will close this issue
@ekohl ekohl reopened this Jun 13, 2022
@github-actions
Copy link

Hello! 👋

This issue has been open for a while and has had no recent activity. We've labelled it with attention-needed so that we can get a clear view of which issues need our attention.

If you are waiting on a response from us we will try and address your comments on a future Community Day.

Alternatively, if it is no longer relevant to you please close the issue with a comment.

@kenyon
Copy link

kenyon commented Sep 20, 2022

reopen

@LukasAud
Copy link
Contributor

Note: #481 seems to be a potential fix for this issue. However, lack of engagement might result in the ticket being closed. Posting link here for future reference, just in case.

@vmpr
Copy link

vmpr commented Jul 7, 2023

would be great to have that feature

@tuxmaster5000
Copy link

I have the same problem. :(
In my case I must set something like:

[foo]
bar = 1
bar = 2

Sample application, that need this:
https://docs.posit.co/connect/admin/python/#enabling-python-support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.