Skip to content

Commit

Permalink
small cleanup (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
giovanni-guidini committed Jun 19, 2024
1 parent a2522d2 commit dd4202a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tasks/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def run_impl_within_lock(
Commit.repoid == repoid, Commit.commitid == commitid
)
commit: Commit = commits_query.first()
assert commit, "Commit not found in database."

test_result_commit_report = commit.commit_report(ReportType.TEST_RESULTS)
if (
Expand Down Expand Up @@ -231,7 +232,7 @@ def run_impl_within_lock(
current_yaml = async_to_sync(get_current_yaml)(commit, repository_service)
else:
current_yaml = UserYaml.from_dict(current_yaml)
assert commit, "Commit not found in database."

try:
ci_results = self.fetch_and_update_whether_ci_passed(
repository_service, commit, current_yaml
Expand Down Expand Up @@ -341,9 +342,6 @@ def run_impl_within_lock(
)
else:
base_report = None
head_report = report_service.get_existing_report_for_commit(
commit, report_class=ReadOnlyReport
)
if head_report is None and empty_upload is None:
self.log_checkpoint(kwargs, UploadFlow.NOTIF_ERROR_NO_REPORT)
return {
Expand Down Expand Up @@ -475,10 +473,10 @@ def has_upcoming_notifies_according_to_redis(
def submit_third_party_notifications(
self,
current_yaml: UserYaml,
base_commit,
commit,
base_report,
head_report,
base_commit: Commit | None,
commit: Commit,
base_report: ReadOnlyReport | None,
head_report: ReadOnlyReport | None,
enriched_pull: EnrichedPull,
empty_upload=None,
# It's only true if the test_result processing is setup
Expand Down

0 comments on commit dd4202a

Please sign in to comment.