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

Use a different link in bugs create from private deck jobs #223

Merged
merged 1 commit into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/objects/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def __init__(
else:
self.pr_id = ""
self.firewatch_config = firewatch_config
self.is_private_deck = True if gcs_creds_file else False

# Set GCS bucket values
self.gcs_bucket = gcs_bucket
Expand Down
18 changes: 10 additions & 8 deletions src/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ def file_jira_issues(
step_name=pair["failure"].step, # type: ignore
failure_type=pair["failure"].failure_type, # type: ignore
classification=pair["rule"].classification, # type: ignore
job_name=job.name, # type: ignore
build_id=job.build_id, # type: ignore
job=job, # type: ignore
failed_test_name=(
pair["failure"].failed_test_name # type: ignore
if firewatch_config.verbose_test_failure_reporting
Expand Down Expand Up @@ -256,8 +255,7 @@ def report_success(self, job: Job, firewatch_config: Configuration) -> None:
project=rule.jira_project,
summary=f"Job {job.name} passed - {date.strftime('%m-%d-%Y')}",
description=self._get_issue_description(
job_name=job.name, # type: ignore
build_id=job.build_id, # type: ignore
job=job, # type: ignore
success_issue=True,
),
issue_type="Story",
Expand Down Expand Up @@ -515,8 +513,7 @@ def _get_file_attachments(

def _get_issue_description(
self,
job_name: str,
build_id: str,
job: Job,
step_name: Optional[str] = None,
failure_type: Optional[str] = None,
classification: Optional[str] = None,
Expand All @@ -539,8 +536,13 @@ def _get_issue_description(
Returns:
str: String object representing the description.
"""
link_line = f"*Prow Job Link:* [{job_name} #{build_id}|https://prow.ci.openshift.org/view/gs/test-platform-results/logs/{job_name}/{build_id}]"
build_id_line = f"*Build ID:* {build_id}"
link_line_base_url = (
"https://qe-private-deck-ci.apps.ci.l2s4.p1.openshiftapps.com/view/gs/qe-private-deck/logs/"
myakove marked this conversation as resolved.
Show resolved Hide resolved
if job.is_private_deck
else "https://prow.ci.openshift.org/view/gs/test-platform-results/logs/"
)
link_line = f"*Prow Job Link:* [{job.name} #{job.build_id}|{link_line_base_url}{job.name}/{job.build_id}]"
build_id_line = f"*Build ID:* {job.build_id}"
firewatch_link_line = f"This {'issue' if success_issue else 'bug'} was filed using [firewatch in OpenShift CI|https://github.com/CSPI-QE/firewatch]"

# If the issue is being created for a failure
Expand Down
Loading