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

Replay PRs from qa-bot command #132

Merged
merged 4 commits into from
Nov 13, 2024
Merged
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
14 changes: 7 additions & 7 deletions gen3-integration-tests/gen3_ci/scripts/generate_slack_report.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import csv
import json
import os

from pathlib import Path

from utils import logger
Expand All @@ -23,7 +22,7 @@ def get_failed_suites():
"type": "section",
"text": {
"type": "mrkdwn",
"text": f"*Failed Suites*: {list(failed_suites)}",
"text": f"To label & retry, just send the following message:\n `@qa-bot replay-pr {os.getenv('REPO')} {os.getenv('PR_NUM')} {','.join(failed_suites)}`",
},
}
return failed_suites_block
Expand Down Expand Up @@ -111,11 +110,6 @@ def generate_slack_report():
logger.info(
"Allure report was not found. Skipping test metrics block generation."
)
# Failed suites list
if test_result == "Failed":
failed_suites_block = get_failed_suites()
if failed_suites_block:
slack_report_json["blocks"].append(failed_suites_block)
# Pod logs url
if test_result == "Failed" and os.getenv("POD_LOGS_URL"):
pod_logs_url__block = {
Expand All @@ -130,6 +124,12 @@ def generate_slack_report():
logger.info(
"Pod logs were not archived. Skipping pod logs url block generation."
)
# qa-bot replay command with failed suites labeled in the PR
if test_result == "Failed":
failed_suites_block = get_failed_suites()
if failed_suites_block:
slack_report_json["blocks"].append(failed_suites_block)

json.dump(slack_report_json, open("slack_report.json", "w"))


Expand Down
Loading