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

Add support for overriding jira issues to comment on. #15427

Merged

Conversation

jameerpathan111
Copy link
Contributor

@jameerpathan111 jameerpathan111 commented Jun 17, 2024

Problem Statement

  • We have a --jira-comments pytest option that we use to add comments to Jira issues for tests marked with Verifies or BlockedBy doc fields. Atm, this can't be overridden, and one has to mark each test with these fields.
  • The JPL team has requested this enhancement so that we can use it in standalone PRT runs.

Solution

  • Update logic for --jira-comments to override issues to comment test results on.

Usage

  • pytest tests/foreman/api/test_ping.py --jira-comments Comment test results on issues mentioned in Verifies and BlockedBy doc fields(No change, this is primary use case).
  • pytest tests/foreman/api/test_ping.py --jira-comments 'SAT-24796,SAT-25230' Comment test results on SAT-24796 and SAT-25230.

Related Issues

@jameerpathan111 jameerpathan111 added CherryPick PR needs CherryPick to previous branches 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 labels Jun 17, 2024
@jameerpathan111 jameerpathan111 self-assigned this Jun 17, 2024
@jameerpathan111 jameerpathan111 requested a review from a team as a code owner June 17, 2024 12:54
@jameerpathan111
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ping.py --jira-comments 'SAT-24796,SAT-25230'
env:
    ROBOTTELO_jira__enable_comment: true

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7406
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_ping.py --jira-comments SAT-24796,SAT-25230 --external-logging
Test Result : ================== 1 passed, 9 warnings in 647.31s (0:10:47) ===================

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jun 17, 2024
Copy link
Member

@jyejare jyejare left a comment

Choose a reason for hiding this comment

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

ACK with non-blocking suggestion.

@@ -8,16 +8,29 @@
from robottelo.utils.issue_handlers.jira import add_comment_on_jira


def parse_comma_separated_list(option_value):
Copy link
Member

Choose a reason for hiding this comment

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

This is a nice utils function, move this to utils init module in robottelo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the PR, and moved it to the utils init module in robottelo.

@jyejare
Copy link
Member

jyejare commented Jun 19, 2024

@devendra104 @omkarkhatavkar We had to use this PR functioning in a standalone PRT job (and for those upstream PR testing) which does not needs PR to open for running regression tests.

In short, we have to introduce new jira-issues parameter in standalone PRT job that will take issues and will report the test results to those issues.

@Satellite-QE Satellite-QE removed the PRT-Passed Indicates that latest PRT run is passed for the PR label Jun 19, 2024
@jameerpathan111
Copy link
Contributor Author

trigger: test-robottelo
pytest: tests/foreman/api/test_ping.py --jira-comments 'SAT-24796,SAT-25230'
env:
    ROBOTTELO_jira__enable_comment: true

@Satellite-QE
Copy link
Collaborator

PRT Result

Build Number: 7447
Build Status: SUCCESS
PRT Comment: pytest tests/foreman/api/test_ping.py --jira-comments SAT-24796,SAT-25230 --external-logging
Test Result : ================== 1 passed, 9 warnings in 632.57s (0:10:32) ===================

@Satellite-QE Satellite-QE added the PRT-Passed Indicates that latest PRT run is passed for the PR label Jun 19, 2024
@JacobCallahan JacobCallahan merged commit 91f875b into SatelliteQE:master Jun 19, 2024
11 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 19, 2024
github-actions bot pushed a commit that referenced this pull request Jun 19, 2024
github-actions bot pushed a commit that referenced this pull request Jun 19, 2024
jyejare pushed a commit that referenced this pull request Jun 21, 2024
Add support for overriding jira issues to comment on. (#15427)

(cherry picked from commit 91f875b)

Co-authored-by: Jameer Pathan <21165044+jameerpathan111@users.noreply.github.com>
jyejare pushed a commit that referenced this pull request Jun 21, 2024
Add support for overriding jira issues to comment on. (#15427)

(cherry picked from commit 91f875b)

Co-authored-by: Jameer Pathan <21165044+jameerpathan111@users.noreply.github.com>
jyejare pushed a commit that referenced this pull request Jun 21, 2024
Add support for overriding jira issues to comment on. (#15427)

(cherry picked from commit 91f875b)

Co-authored-by: Jameer Pathan <21165044+jameerpathan111@users.noreply.github.com>
jyejare pushed a commit to jyejare/robottelo that referenced this pull request Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 6.15.z Introduced in or relating directly to Satellite 6.15 CherryPick PR needs CherryPick to previous branches PRT-Passed Indicates that latest PRT run is passed for the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants