Skip to content

OSIDB-4875- remove owner and qe_owner parsing from Jira tracker and task download#1252

Merged
svelamak merged 1 commit intomasterfrom
fix/OSIDB-4875-remove-owner-parsing
Apr 28, 2026
Merged

OSIDB-4875- remove owner and qe_owner parsing from Jira tracker and task download#1252
svelamak merged 1 commit intomasterfrom
fix/OSIDB-4875-remove-owner-parsing

Conversation

@svelamak
Copy link
Copy Markdown
Contributor

@svelamak svelamak commented Apr 23, 2026

Remove owner and qe_owner parsing from Jira tracker download.
These fields used JiraUserMapping.cloud_id_to_kerberos which fails for service accounts and deactivated users.
-convertors.py - Removed owner and qe_owner parsing from JiraTrackerConvertor and JiraTaskConvertor.
-constants.py - Removed assignee: ["owner"] .
-test_convertors.py - Updated tests accordingly.
-CHANGELOG.md - Added entry.
Closes: OSIDB - 4875

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: a2276fce-762e-4c26-baba-20ae175c7e07

📥 Commits

Reviewing files that changed from the base of the PR and between 45a4d56 and 9e68f72.

📒 Files selected for processing (2)
  • collectors/jiraffe/tests/test_collectors.py
  • docs/CHANGELOG.md
💤 Files with no reviewable changes (1)
  • collectors/jiraffe/tests/test_collectors.py
✅ Files skipped from review due to trivial changes (1)
  • docs/CHANGELOG.md

📝 Walkthrough

Summary by CodeRabbit

Removed

  • Owner and QE owner field values from Jira issue assignees are no longer automatically synchronized to tracker records during Jira tracker downloads.

Walkthrough

Removed Jira assignee-to-owner mapping and related normalization/persistence logic; tests and changelog updated to stop deriving owner and qe_owner from Jira assignees.

Changes

Cohort / File(s) Summary
Constants
collectors/jiraffe/constants.py
Deleted the "assignee": ["owner"] entry from TASK_CHANGELOG_FIELD_MAPPING.
Conversion logic
collectors/jiraffe/convertors.py
Removed JiraUserMapping usage and all code that normalized or saved Jira assignee account IDs into owner/qe_owner fields; owner no longer derived or persisted from Jira assignee.
Convertor tests
collectors/jiraffe/tests/test_convertors.py
Removed instantiation/import of JiraUserMappingFactory and the assertion that flaw.owner came from the mapping; adjusted mock issue setup accordingly.
Collector tests
collectors/jiraffe/tests/test_collectors.py
Removed per-test creation of JiraUserMapping via JiraUserMappingFactory in two VCR tests; other test logic unchanged.
Changelog
docs/CHANGELOG.md
Added an Unreleased -> Removed entry documenting removal of owner/qe_owner parsing from Jira tracker download (OSIDB-4875).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and specifically describes the main change: removing owner and qe_owner parsing from Jira tracker download, matching the primary objective.
Description check ✅ Passed The description is clearly related to the changeset, explaining why the removal was necessary and listing the affected files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/OSIDB-4875-remove-owner-parsing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@svelamak svelamak requested a review from a team April 23, 2026 15:26
Copy link
Copy Markdown
Contributor

@Jincxz Jincxz left a comment

Choose a reason for hiding this comment

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

Mostly LGTM.

The syncing of the owner was also removed for the task convertor but I think this is fine since we no longer sync tasks from Jira to OSIDB. Could another @RedHatProductSecurity/osidb-devs confirm this?

There are also a few more places in the tests that can be cleaned up:

JiraUserMappingFactory(atlassian_cloud_id="test-cloud-id")

JiraUserMappingFactory(atlassian_cloud_id="test-cloud-id")

mock_issue.fields.assignee = None
mock_issue.fields.customfield_12316243 = None

@svelamak
Copy link
Copy Markdown
Contributor Author

@Jincxz, addressed all the cleanup suggestions. Thanks for the review!

@svelamak svelamak requested a review from Jincxz April 24, 2026 14:05
Comment thread docs/CHANGELOG.md Outdated
@svelamak svelamak requested a review from Jincxz April 24, 2026 14:47
Copy link
Copy Markdown
Contributor

@Jincxz Jincxz left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for addressing my comments!

Copy link
Copy Markdown
Contributor

@JakubFrejlach JakubFrejlach left a comment

Choose a reason for hiding this comment

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

I agree with @Jincxz that the collector is disabled in ops, but we have a scope mismatch here. OSIDB-4875 and the changelog specifically address trackers, yet this PR modifies tasks as well.

We should either:

  • Update the Jira issue and changelog to explicitly include task owner removal.
  • Revert the changes to task owners to keep this PR strictly about trackers.

Otherwise, we're introducing a 'silent' breaking change for tasks that isn't documented anywhere.

@svelamak
Copy link
Copy Markdown
Contributor Author

Good catch! As the task collector is disabled in ops, keeping the change. Will update the changelog and Jira ticket explicitly mention the task owner removal as well.

Copy link
Copy Markdown
Contributor

@JakubFrejlach JakubFrejlach left a comment

Choose a reason for hiding this comment

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

Thank you for addressing my points! LGTM now, just squash commits a bit please.

@svelamak svelamak changed the title OSIDB-4875- remove owner and qe_owner parsing from Jira tracker d… OSIDB-4875- remove owner and qe_owner parsing from Jira tracker and task download Apr 28, 2026
@svelamak svelamak force-pushed the fix/OSIDB-4875-remove-owner-parsing branch from 8a99b9b to 441dcac Compare April 28, 2026 13:55
@svelamak svelamak added this pull request to the merge queue Apr 28, 2026
Merged via the queue into master with commit f79215e Apr 28, 2026
10 checks passed
@svelamak svelamak deleted the fix/OSIDB-4875-remove-owner-parsing branch April 28, 2026 14:22
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.

3 participants