Skip to content

Enhance Jira issue fetcher - #527

Merged
nforro merged 4 commits into
packit:mainfrom
nforro:fetcher
May 27, 2026
Merged

nforro merged 4 commits into
packit:mainfrom
nforro:fetcher

Conversation

@nforro

@nforro nforro commented May 27, 2026

Copy link
Copy Markdown
Member

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces configuration options and logic to filter out modular issues and ignored components, and to limit the maximum number of fetched issues via a new MAX_ISSUES parameter. The review feedback highlights critical efficiency and robustness improvements in the issue processing loop: moving the max_issues check to the top of the loop to avoid redundant processing, replacing set subtraction inside the loop with an O(1) membership check to prevent O(N) copies on each iteration, and defensively handling potentially null components fields to avoid a TypeError during parsing.

Comment thread ymir/jira_issue_fetcher/jira_issue_fetcher.py Outdated
@nforro

nforro commented May 27, 2026

Copy link
Copy Markdown
Member Author

/gemini review

majamassarini
majamassarini previously approved these changes May 27, 2026

@majamassarini majamassarini left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces filtering capabilities to the Jira issue fetcher, allowing it to skip modular issues and issues belonging to ignored components, as well as limiting the total number of enqueued issues via a new MAX_ISSUES configuration. Feedback on these changes highlights a potential AttributeError when accessing missing fields, a case-sensitivity bug when matching ignored components, and an opportunity to optimize the Jira API pagination loop by breaking early once the MAX_ISSUES limit is reached.

Comment thread ymir/jira_issue_fetcher/jira_issue_fetcher.py Outdated
Comment thread ymir/jira_issue_fetcher/jira_issue_fetcher.py Outdated
Comment thread ymir/jira_issue_fetcher/jira_issue_fetcher.py
lbarcziova
lbarcziova previously approved these changes May 27, 2026

@lbarcziova lbarcziova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice!

Comment thread openshift/configmap-jira-issue-fetcher-env.yml Outdated
@nforro

nforro commented May 27, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces new filtering and limiting capabilities to the Jira issue fetcher. It adds support for ignoring specific Jira components via IGNORED_COMPONENTS, skipping modular issues based on a regex match on customfield_10669, and limiting the number of fetched issues using MAX_ISSUES. Unit tests have been added to verify these features. The review feedback suggests several improvements: validating that MAX_ISSUES is a positive integer, pre-compiling the modular component regex pattern during initialization to avoid repeated compilation overhead, and adding defensive type checks when extracting components and matching downstream component strings.

Comment thread ymir/jira_issue_fetcher/jira_issue_fetcher.py
Comment thread ymir/jira_issue_fetcher/jira_issue_fetcher.py
Comment thread ymir/jira_issue_fetcher/jira_issue_fetcher.py
Also optionally limit the number of issues to process.

Signed-off-by: Nikola Forró <nforro@redhat.com>
Assisted-by: Claude Opus 4.6 via Claude Code
@nforro

nforro commented May 27, 2026

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces filtering capabilities to the Jira issue fetcher, allowing it to ignore modular issues and specific components, and adds a configurable limit on the maximum number of issues to process. The review feedback highlights a critical duplication bug that could cause issues to be repeatedly pushed to the queue, a potential startup crash due to unhandled parsing of the MAX_ISSUES environment variable, and an inefficiency where Jira pagination continues even after the maximum issue limit is reached.

Comment thread ymir/jira_issue_fetcher/jira_issue_fetcher.py
Comment thread ymir/jira_issue_fetcher/jira_issue_fetcher.py
Comment thread ymir/jira_issue_fetcher/jira_issue_fetcher.py
TomasTomecek
TomasTomecek previously approved these changes May 27, 2026
Comment thread openshift/configmap-jira-issue-fetcher-env.yml Outdated
nforro added 2 commits May 27, 2026 11:42
Signed-off-by: Nikola Forró <nforro@redhat.com>
Assisted-by: Claude Opus 4.6 via Claude Code
Signed-off-by: Nikola Forró <nforro@redhat.com>
majamassarini
majamassarini previously approved these changes May 27, 2026

@majamassarini majamassarini left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: Nikola Forró <nforro@redhat.com>
@nforro
nforro merged commit 3c016f4 into packit:main May 27, 2026
9 checks passed
@nforro
nforro deleted the fetcher branch May 27, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants