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

match section names containing prefix character (normally [) #457

Merged
merged 1 commit into from May 23, 2022

Conversation

tja523
Copy link
Contributor

@tja523 tja523 commented Jul 27, 2021

Currently sections with names including the prefix (normally [) can be
created by this provider, but they are then not matched by the regex,
meaning puppet will create a new section (with the same name) every time
it runs. Fix that by allowing the section prefix in the section name.
Any line that starts with the correct prefix (normally [) and ends with
the correct suffix (normally ]) is treated as a valid section header,
regardless of what is between them.

This is needed for splunk inputs.conf file where regexes, including
square brackets, are allowed inside the section name.

@tja523 tja523 requested a review from a team as a code owner July 27, 2021 15:29
@CLAassistant
Copy link

CLAassistant commented Jul 27, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@daianamezdrea
Copy link
Contributor

Hi @tja523, just closing and reopening the PR to trigger the tests

@github-actions
Copy link

This PR has been marked as stale because it has been open for a while and has had no recent activity. If this PR is still important to you please drop a comment below and we will add this to our backlog to complete. Otherwise, it will be closed in 7 days.

@github-actions github-actions bot added the stale label Apr 26, 2022
@github-actions github-actions bot closed this May 3, 2022
@tja523
Copy link
Contributor Author

tja523 commented May 3, 2022

Hi, yes this PR is still important to us, so please reopen it.

@LukasAud
Copy link
Contributor

LukasAud commented May 3, 2022

Hi @tja523, we will be reopening your PR soon. We are currently using the stale-bot to help organise our work better, sorry if this caused any inconvenience. Hopefully, we will be able to take a closer look and properly review your PR soon.

@LukasAud LukasAud reopened this May 3, 2022
@LukasAud LukasAud removed the stale label May 3, 2022
Currently sections with names including the prefix (normally [) can be
created by this provider, but they are then not matched by the regex,
meaning puppet will create a new section (with the same name) every time
it runs. Fix that by allowing the section prefix in the section name.
Any line that starts with the correct prefix (normally [) and ends with
the correct suffix (normally ]) is treated as a valid section header,
regardless of what is between them.

This is needed for splunk inputs.conf file where regexes, including
square brackets, are allowed inside the section name.
@chelnak
Copy link
Contributor

chelnak commented May 23, 2022

@tja523 This looks good to me. Thank you.

@chelnak chelnak merged commit 9cfa30b into puppetlabs:main May 23, 2022
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.

None yet

5 participants