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
Find fix #73961
Merged
Merged
Find fix #73961
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: ansible#50067
ansibot
added
affects_2.11
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
module
This issue/PR relates to a module.
needs_triage
Needs a first human triage before being processed.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
labels
Mar 19, 2021
added changelog
samdoran
reviewed
Mar 19, 2021
Co-authored-by: Sam Doran <sdoran@redhat.com>
samdoran
approved these changes
Mar 19, 2021
samdoran
pushed a commit
to samdoran/ansible
that referenced
this pull request
Mar 19, 2021
…3961) When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: ansible#50067 * moved change to new location added changelog * Update lib/ansible/modules/find.py Co-authored-by: Ian Wienand <iwienand@redhat.com>. (cherry picked from commit 089d0a0) Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
bcoca
added a commit
to bcoca/ansible
that referenced
this pull request
Mar 19, 2021
When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: ansible#50067 * moved change to new location added changelog * Update lib/ansible/modules/find.py Co-authored-by: Ian Wienand <iwienand@redhat.com> (cherry picked from commit 089d0a0)
samdoran
pushed a commit
to samdoran/ansible
that referenced
this pull request
Mar 19, 2021
) When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: ansible#50067 * moved change to new location added changelog * Update lib/ansible/modules/find.py Co-authored-by: Ian Wienand <iwienand@redhat.com>. (cherry picked from commit 089d0a0) Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
mkrizek
removed
the
needs_triage
Needs a first human triage before being processed.
label
Mar 22, 2021
relrod
added a commit
that referenced
this pull request
Apr 5, 2021
…73966) When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: #50067 * moved change to new location added changelog * Update lib/ansible/modules/find.py Co-authored-by: Ian Wienand <iwienand@redhat.com>. (cherry picked from commit 089d0a0) Co-authored-by: Brian Coca <bcoca@users.noreply.github.com> * Update fix_find_default.yml Co-authored-by: Rick Elrod <rick@elrod.me>
relrod
pushed a commit
to bcoca/ansible
that referenced
this pull request
Apr 5, 2021
When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: ansible#50067 * moved change to new location added changelog * Update lib/ansible/modules/find.py Co-authored-by: Ian Wienand <iwienand@redhat.com> (cherry picked from commit 089d0a0)
relrod
added a commit
that referenced
this pull request
Apr 5, 2021
When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: #50067 * moved change to new location added changelog * Update lib/ansible/modules/find.py Co-authored-by: Ian Wienand <iwienand@redhat.com> (cherry picked from commit 089d0a0) * Fix up bad rebase, nuke duplicate "elements:" lines Signed-off-by: Rick Elrod <rick@elrod.me> Co-authored-by: Rick Elrod <rick@elrod.me> Co-authored-by: Brian Coca <bcoca@users.noreply.github.com> Co-authored-by: Sam Doran <sdoran@redhat.com>
bcoca
added a commit
to bcoca/ansible
that referenced
this pull request
Apr 6, 2021
When using "use_regex: yes" and setting an excludes: without specifying a pattern: the existing code passes the file-glob '*' to the regex matcher. This results in an internal invalid-regex exception being thrown. This maintains the old semantics of a default match-all for pattern: but switches the default to '.*' when use_regex is specified. The code made sense as-is before excludes: was added (2.5). In that case, it made no sense to set use_regex but *not* set a pattern. However, with excludes: it now makes sense to only want to exclude a given regex but not specify a specific matching pattern. Closes: ansible#50067 * moved change to new location added changelog * Update lib/ansible/modules/find.py Co-authored-by: Ian Wienand <iwienand@redhat.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
affects_2.11
bug
This issue/PR relates to a bug.
core_review
In order to be merged, this PR must follow the core review workflow.
module
This issue/PR relates to a module.
support:core
This issue/PR relates to code supported by the Ansible Engineering Team.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #50070
Fixes #50067
ISSUE TYPE
COMPONENT NAME
find