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

Add support for multiple values per key #481

Closed
wants to merge 2 commits into from

Conversation

omolenkamp
Copy link

This change adds support for ini files in which the same key is used multiple times for lists of values, for example:

[section]
foo=a
foo=b

To set multiple values, an array of values can be passed to the value property of ini_setting.

When passing a single value, the module works as before, with one exception: when a single value is passed to value, but the ini file already contains multiple lines with the same key, any additional lines will now be removed instead of retained.

@omolenkamp omolenkamp requested a review from a team as a code owner June 13, 2022 10:14
@puppet-community-rangefinder
Copy link

ini_setting is a type

Breaking changes to this file MAY impact these 151 modules (near match):

This module is declared in 125 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@kenyon
Copy link

kenyon commented Jun 13, 2022

This would fix #41 and https://tickets.puppetlabs.com/browse/MODULES-5012

@ekohl ekohl linked an issue Jun 13, 2022 that may be closed by this pull request
@chelnak chelnak added the bugfix label Jun 20, 2022
@chelnak
Copy link
Contributor

chelnak commented Jun 20, 2022

Hey @omolenkamp , thank you for your contribution. Looks like we have failures in both spec and acceptance tests for this.

Is it something that you could take a look at? We are here to help if you need anything.

@omolenkamp
Copy link
Author

All PR Testing jobs are failing on the step "Install agent", but it doesn't look like that's something I broke.

@chelnak
Copy link
Contributor

chelnak commented Jun 22, 2022

Hey, I think these issues should be resolved now. I'll re kick the tests 🙂

@ekohl
Copy link
Collaborator

ekohl commented Jun 22, 2022

The test failures look related, probably broke idempotency but not 100% sure.

@LukasAud
Copy link
Contributor

It looks like there is a single failure occurring across all OSs. Something related to change logging. If this issue is fixed, we should have no problem merging this PR.

@github-actions
Copy link

Hello! 👋

This pull request 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 PRs 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 PR with a comment.

Please note that if a pull request receives no update for 7 after it has been labelled, it will be closed. We are always happy to re-open pull request if they have been closed in error.

@kenyon
Copy link

kenyon commented Sep 24, 2022

Keep open.

@david22swan
Copy link
Member

Closing and re-opening to re-kick the tests as the logs of the last run have been discarded.

@david22swan david22swan reopened this Sep 26, 2022
@puppet-community-rangefinder
Copy link

ini_setting is a type

Breaking changes to this file MAY impact these 154 modules (near match):

This module is declared in 125 of 579 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@LukasAud
Copy link
Contributor

Hi @omolenkamp, it seems like your PR has been stale for a while. Our team is currently cleaning up our modules and we are looking to address any stale PRs. Since there hasn't been any engagement for a long time, we have decided to put this PR back on our 'attention-needed' list. Please be aware that PRs with this tag are generally closed within 1-2 weeks if there is no response back from the author and/or engagement from the community. Please be aware that closed PRs an be reopened if the author wants to continue working on them!

Since your PR is a potential fix for one of our currently ongoing issues with the module, we can also keep it open if someone else volunteers to 'adopt' this PR and you agree with it.

Thanks for your understanding.

@omolenkamp
Copy link
Author

Sorry, haven't looked at this issue for a while. If the tests can be run again to produce new logs, I'll try to fix the remaining bug soon.

@jordanbreen28 jordanbreen28 reopened this Mar 9, 2023
@puppet-community-rangefinder
Copy link

ini_setting is a type

Breaking changes to this file MAY impact these 157 modules (near match):

This module is declared in 127 of 580 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@jordanbreen28
Copy link
Contributor

jordanbreen28 commented Mar 9, 2023

@omolenkamp - looks like our github bot wrongly closed this PR. I've re-opened to kick the tests off like you requested. Apologies for the delay in noticing this!

Looks like its one recurring test failure for all OS's, so hoping its nothing to major to fix. Thanks for your work on this one.

@jordanbreen28
Copy link
Contributor

Hey @omolenkamp!
I'm going to go ahead and close this PR again due to lack of engagement. If you get some time to address the test failures please do re-open this request and we'll take it from here.

@vmpr
Copy link

vmpr commented Jul 7, 2023

reopen
@omolenkamp can you please finish that MR? we also need it but I am not able to write in myself :(

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

Successfully merging this pull request may close these issues.

Can't set the same key twice
9 participants