Skip to content

Commit b231159

Browse files
Temporarily disable PR binary graduation
1 parent 2d19a5f commit b231159

1 file changed

Lines changed: 0 additions & 57 deletions

File tree

spackbot/handlers/mirrors.py

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@
55

66
import spackbot.helpers as helpers
77
from spackbot.helpers import (
8-
pr_expected_base,
98
pr_mirror_base_url,
10-
pr_shared_mirror,
11-
publish_mirror_base_url,
129
)
1310
from spackbot.workers import (
14-
copy_pr_mirror,
15-
prune_mirror_duplicates,
16-
update_mirror_index,
1711
delete_pr_mirror,
1812
get_queue,
1913
TASK_QUEUE_LONG,
@@ -33,76 +27,25 @@ async def close_pr_mirror(event, gh):
3327
return
3428

3529
# Get PR event info
36-
base_branch = payload["pull_request"]["base"]["ref"]
37-
is_merged = payload["pull_request"]["merged"]
3830
pr_number = payload["number"]
3931
pr_branch = payload["pull_request"]["head"]["ref"]
4032

4133
pr_mirror_url = f"{pr_mirror_base_url}/pr{pr_number}_{pr_branch}"
42-
shared_pr_mirror_url = f"{pr_mirror_base_url}/{pr_shared_mirror}"
4334

4435
# Get task queue info
4536
ltask_q = get_queue(TASK_QUEUE_LONG)
46-
copy_job = None
4737
job_metadata = {
4838
"type": None,
4939
"pr_number": pr_number,
5040
"pr_branch": pr_branch,
5141
}
5242

53-
if is_merged and base_branch == pr_expected_base:
54-
logger.info(
55-
f"PR {pr_number}/{pr_branch} merged to develop, graduating binaries"
56-
)
57-
58-
# Copy all of the stack binaries from the PR to the shared PR
59-
# mirror.
60-
job_metadata.update({"type": "copy"})
61-
copy_job = ltask_q.enqueue(
62-
copy_pr_mirror,
63-
pr_mirror_url,
64-
shared_pr_mirror_url,
65-
meta=job_metadata,
66-
job_timeout=WORKER_JOB_TIMEOUT,
67-
)
68-
logger.info(f"Copy job queued: {copy_job.id}")
69-
70-
# Prune duplicates that have been published after copy
71-
# since copy may have introduced duplicates for some reason
72-
job_metadata.update({"type": "prune"})
73-
shared_stack_pr_mirror_url = f"{shared_pr_mirror_url}/{{stack}}"
74-
publish_stack_mirror_url = (
75-
f"{publish_mirror_base_url}/{{stack}}/{pr_expected_base}"
76-
)
77-
prune_job = ltask_q.enqueue(
78-
prune_mirror_duplicates,
79-
shared_stack_pr_mirror_url,
80-
publish_stack_mirror_url,
81-
job_timeout=WORKER_JOB_TIMEOUT,
82-
depends_on=copy_job,
83-
meta=job_metadata,
84-
)
85-
logger.info(f"Pruning job queued: {prune_job.id}")
86-
87-
# Queue a reindex for the stack mirror to attempt to run after
88-
# prune.
89-
job_metadata.update({"type": "reindex"})
90-
update_job = ltask_q.enqueue(
91-
update_mirror_index,
92-
shared_stack_pr_mirror_url,
93-
job_timeout=WORKER_JOB_TIMEOUT,
94-
depends_on=prune_job,
95-
meta=job_metadata,
96-
)
97-
logger.info(f"Reindex job queued: {update_job.id}")
98-
9943
# Delete the mirror
10044
job_metadata.update({"type": "delete"})
10145
del_job = ltask_q.enqueue(
10246
delete_pr_mirror,
10347
pr_mirror_url,
10448
meta=job_metadata,
10549
job_timeout=WORKER_JOB_TIMEOUT,
106-
depends_on=copy_job,
10750
)
10851
logger.info(f"Delete job queued: {del_job.id}")

0 commit comments

Comments
 (0)