Skip to content

Commit

Permalink
fix(site-migration): Skip cleanup if site never got created
Browse files Browse the repository at this point in the history
  • Loading branch information
balamurali27 committed Feb 13, 2025
1 parent 32fe213 commit 0a36dbb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions press/press/doctype/site_migration/site_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,11 @@ def adjust_plan_if_required(self):
self.run_next_step()

def is_cleanup_done(self, job: "AgentJob") -> bool:
return (
job.job_type == "Archive Site" and job.status == "Success" and job.bench == self.destination_bench
return (job.job_type == "Archive Site" and job.bench == self.destination_bench) and (
job.status == "Success"
or (
job.status == "Failure" and f"KeyError: '{self.site}'" in str(job.traceback)
) # sometimes site may not even get created in destination to clean it up
)


Expand Down

0 comments on commit 0a36dbb

Please sign in to comment.