Skip to content

Commit d625a0d

Browse files
committed
replace scenario link
1 parent 475513b commit d625a0d

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

qa/tools/apex_algorithm_qa_tools/test_failure_handler.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,32 +85,24 @@ def get_scenario_contacts(scenario_id: str) -> list:
8585

8686
def get_scenario_link(scenario_id: str) -> str:
8787
"""Generate link to process graph file at specific commit"""
88-
# Get the current commit SHA from GitHub environment
8988
commit_sha = os.getenv("GITHUB_SHA", "main") # Fallback to 'main' if not in CI
90-
91-
# Base repository URL
9289
base_url = f"https://github.com/{GITHUB_REPO}/blob/{commit_sha}"
93-
9490
algorithm_catalog = get_project_root() / "algorithm_catalog"
9591

96-
# Search through all provider directories
9792
for provider_dir in algorithm_catalog.iterdir():
9893
if not provider_dir.is_dir():
9994
continue
100-
101-
# Check for matching algorithm directory
10295
algorithm_dir = provider_dir / scenario_id
10396
if not algorithm_dir.exists():
10497
continue
105-
106-
# Look for records file
10798
scenario_path = algorithm_dir / "benchmark_scenarios" / f"{scenario_id}.json"
108-
10999
if scenario_path.exists():
110-
return f"{base_url}/{"algorithm_catalog"}/{scenario_path.as_posix()}"
100+
# Calculate the relative path from the project root.
101+
relative_path = scenario_path.relative_to(get_project_root())
102+
return f"{base_url}/{relative_path.as_posix()}"
111103

112104
logger.warning(f"No benchmark found for scenario {scenario_id} on commit {base_url}")
113-
return []
105+
return ""
114106

115107

116108
def parse_failed_tests():

0 commit comments

Comments
 (0)