Skip to content

Commit

Permalink
Remove warning from github eval fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Jan 5, 2025
1 parent c353a62 commit 475fbc0
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions nixpkgs_review/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pathlib import Path
from typing import IO, Any, override

from .utils import System, warn
from .utils import System


def pr_url(pr: int) -> str:
Expand Down Expand Up @@ -175,32 +175,17 @@ def get_github_action_eval_result(
workflow_run["artifacts_url"],
)["artifacts"]

found_comparison = False
for artifact in artifacts:
if artifact["name"] != "comparison":
continue
found_comparison = True
changed_paths: Any = self.get_json_from_artifact(
workflow_id=artifact["id"],
json_filename="changed-paths.json",
)
if changed_paths is None:
warn(
f"Found comparison artifact, but no changed-paths.json in workflow {workflow_run['html_url']}"
)
continue
if (path := changed_paths.get("rebuildsByPlatform")) is not None:
assert isinstance(path, dict)
return path

if not found_comparison:
if workflow_run["status"] == "queued":
warn(
f"Found eval workflow run, but evaluation is still work in progress: {workflow_run['html_url']}"
)
else:
warn(
f"Found eval workflow run, but no comparison artifact in {workflow_run['html_url']}."
)

return None

0 comments on commit 475fbc0

Please sign in to comment.