#1125 backend: do not start a build if copr_base is not available yet
Merged 4 years ago by praiskup. Opened 4 years ago by frostyx.
copr/ frostyx/copr block-build-until-repo  into  master

@@ -1,5 +1,6 @@ 

  # coding: utf-8

  

+ import os

  import time

  import multiprocessing

  
@@ -181,6 +182,11 @@ 

                      self.log.debug("Skipped job %s, cached", job)

                      continue

  

+                 repodata = os.path.join(job.destdir, job.chroot, "repodata/repomd.xml")

+                 if not os.path.exists(repodata) and job.chroot != "srpm-builds":

+                     self.log.debug("Skipping job %s because copr_base repo is not available yet", job)

+                     continue

+ 

                  # ... and if the task is new to us,

                  # allocate new vm and run full build

                  try:

We don't have any mechanism to define relationships between builds
and actions, so we can possibly come across a situation when an action
for creating repodata for new project takes a longer time than
expected and meanwhile a build in the project is started. That will
inevitably result in failure because we set skip_if_unavailable=0
for the [copr_base] repository.

Metadata Update from @frostyx:
- Pull-request tagged with: can-be-merged

4 years ago

Commit 6cf66a9 fixes this pull-request

Pull-Request has been merged by praiskup

4 years ago