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

fix(inputs.jenkins): Filter after searching sub-folders #14105

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

powersj
Copy link
Contributor

@powersj powersj commented Oct 13, 2023

Currently, the Jenkins plugin will apply the user filter to directory
names immediately. If the directory does not match the filter it would
toss the folder. This prevents traversing into the folder itself where a
user might want a job inside the folder.

This change will move the filtering operation to occur after we kick off
directory traversal. The changes to the tests were necessary since we
never went into the folders correctly. The test results are the same,
the changes are to the response our mock jenkins server provides.

fixes: #14054

@telegraf-tiger telegraf-tiger bot added fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Oct 13, 2023
Currently, the Jenkins plugin will apply the user filter to directory
names immediately. If the directory does not match the filter it would
toss the folder. This prevents traversing into the folder itself where a
user might want a job inside the folder.

This change will move the filtering operation to occur after we kick off
directory traversal. The changes to the tests were necessary since we
never went into the folders correctly. The test results are the same,
the changes are to the response our mock jenkins server provides.

fixes: influxdata#14054
@powersj powersj changed the title fix(inputs.jenkins): debug output fix(inputs.jenkins): Filter after searching sub-folders Oct 18, 2023
@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Oct 18, 2023
@powersj powersj marked this pull request as ready for review October 18, 2023 13:20
@telegraf-tiger
Copy link
Contributor

Copy link
Contributor

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @powersj!

@srebhan srebhan merged commit 3fbe624 into influxdata:master Oct 19, 2023
25 checks passed
@github-actions github-actions bot added this to the v1.28.3 milestone Oct 19, 2023
athornton pushed a commit to lsst-sqre/telegraf that referenced this pull request Oct 19, 2023
powersj added a commit that referenced this pull request Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix pr to fix corresponding bug plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[[inputs.jenkins]] job_include does not work for jobs inside folders
2 participants