Skip to content

Conversation

@k0machi
Copy link
Collaborator

@k0machi k0machi commented Dec 15, 2025

This commit adds support for interfacing with Atlassian's JIRA service,
allowing argus users to attach, delete and look up JIRA issues for test
runs.

Fixes #847

@k0machi k0machi self-assigned this Dec 15, 2025
@k0machi k0machi requested review from fruch and soyacz December 15, 2025 08:24
Copy link
Collaborator

@soyacz soyacz left a comment

Choose a reason for hiding this comment

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

Comments as we discussed. I'll return to this review after the adjustments.

@k0machi
Copy link
Collaborator Author

k0machi commented Dec 16, 2025

Demo (styles are unfinished right now):

image

@k0machi
Copy link
Collaborator Author

k0machi commented Dec 16, 2025

Still a couple of things to iron out, mostly fixups for logic that filters GithubIssues as it needs dispatch logic for both now.

Copy link
Collaborator

@soyacz soyacz left a comment

Choose a reason for hiding this comment

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

looks pretty good.
Good opportunity to add unit tests.

@k0machi k0machi marked this pull request as ready for review December 17, 2025 13:58
@k0machi
Copy link
Collaborator Author

k0machi commented Dec 17, 2025

@soyacz Ready for review. I've added some tests, but they're disabled because test env doesn't have a way currently to interact with github or jira.

@k0machi
Copy link
Collaborator Author

k0machi commented Dec 17, 2025

Demo:

image

Copy link
Collaborator

@soyacz soyacz left a comment

Choose a reason for hiding this comment

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

Overall LGTM, take only for these comments AI made if are legit and apply fixes if needed:

  • frontend/Github/Issues.svelte:126-136 – label2color calls sha1 that is never imported in the module script (the only import is in the
    instance script), so the component won’t compile/run once this helper is used (JiraIssue imports it) and the UI breaks before
    rendering issues.
  • argus/backend/service/issue_service.py:9-12 & argus/backend/tests/conftest.py:171-177 – IssueService now eagerly instantiates
    JiraService (which requires JIRA_SERVER/JIRA_EMAIL/JIRA_TOKEN and a live Jira connection). Any code path or test that just needs
    GitHub issues will now fail at construction time when Jira isn’t configured/available, even though the feature is optional and tests
    are marked skipped. This makes existing GitHub-only flows and CI brittle.
  • frontend/Github/Issues.svelte:207-219 & argus/backend/service/jira_service.py:102/64 – Jira statuses are lowercased when created (“to
    do”, “in progress”) but refreshed with original casing and spaces; the UI filter hardcodes "todo"/lowercase keys. After a refresh,
    Jira issues can disappear from the filter (state key mismatch) and “To Do” is never matched. Normalizing states (including spaces) is
    needed both at ingest and refresh.
  • argus/backend/service/jira_service.py:42-75 – Initial refresh window is set to Jan 1, 2025 and search uses the default search_issues
    page (max 50). On first run this skips all historical issues (nothing updated after that future timestamp) and ongoing sync misses
    updates beyond the first page when more than 50 issues changed. The Jira sync effectively becomes a no-op for most deployments.
  • frontend/Github/IssuesCopyModal.svelte:45-56 – Uses document.querySelector/DOM scraping to copy HTML. This bypasses Svelte bindings
    and breaks the “avoid global selectors” guideline; a simple bind:this on the table would keep it rune-friendly and testable.



@pytest.mark.skip("Jira Mock is not available")
def test_submit_jira_issue(client_service: ClientService, sct_service: SCTService, testrun_service: TestRunService, fake_test: ArgusTest, issue_service: IssueService):
Copy link
Collaborator

Choose a reason for hiding this comment

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

indeed there are no mocks for these, but we don't need to much.
E.g for Jira, we can create one with just 2 methods (search and issue) that will return something and attach it to self.jira. I suppose AI will be able to do that.
You can try it in this PR or create a followup task we'll take later (I also can contribute).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can do that later yes, I've decided to put this off to a followup.

Copy link
Collaborator

Choose a reason for hiding this comment

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

just remember to add a task

This commit adds support for interfacing with Atlassian's JIRA service,
allowing argus users to attach, delete and look up JIRA issues for test
runs.

Fixes scylladb#847
@k0machi
Copy link
Collaborator Author

k0machi commented Dec 17, 2025

  • frontend/Github/Issues.svelte:126-136 – label2color calls sha1 that is never imported in the module script (the only import is in the
    instance script), so the component won’t compile/run once this helper is used (JiraIssue imports it) and the UI breaks before
    rendering issues.

Incorrect.

  • argus/backend/service/issue_service.py:9-12 & argus/backend/tests/conftest.py:171-177 – IssueService now eagerly instantiates
    JiraService (which requires JIRA_SERVER/JIRA_EMAIL/JIRA_TOKEN and a live Jira connection). Any code path or test that just needs
    GitHub issues will now fail at construction time when Jira isn’t configured/available, even though the feature is optional and tests
    are marked skipped. This makes existing GitHub-only flows and CI brittle.

Kinda irrelevant right now as we don't have CI for issues that utilizes these tokens. You can also say the same about GithubService (before and now).

  • frontend/Github/Issues.svelte:207-219 & argus/backend/service/jira_service.py:102/64 – Jira statuses are lowercased when created (“to
    do”, “in progress”) but refreshed with original casing and spaces; the UI filter hardcodes "todo"/lowercase keys. After a refresh,
    Jira issues can disappear from the filter (state key mismatch) and “To Do” is never matched. Normalizing states (including spaces) is
    needed both at ingest and refresh.

Good catch. Will fix.

  • argus/backend/service/jira_service.py:42-75 – Initial refresh window is set to Jan 1, 2025 and search uses the default search_issues
    page (max 50). On first run this skips all historical issues (nothing updated after that future timestamp) and ongoing sync misses
    updates beyond the first page when more than 50 issues changed. The Jira sync effectively becomes a no-op for most deployments.

Irrelevant, the history started a month ago. I will double check the search size however.

  • frontend/Github/IssuesCopyModal.svelte:45-56 – Uses document.querySelector/DOM scraping to copy HTML. This bypasses Svelte bindings
    and breaks the “avoid global selectors” guideline; a simple bind:this on the table would keep it rune-friendly and testable.

Not sure what it means by "rune-friendly", but yes, we should use bind:this here.

Copy link
Collaborator

@soyacz soyacz left a comment

Choose a reason for hiding this comment

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

LGTM

@k0machi k0machi merged commit 6dce723 into scylladb:master Dec 19, 2025
2 checks passed
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.

Add support for JIRA issues

2 participants