phase1: remove 'shared_wd' worker option (always set)
authorThibaut VARÈNE <hacks@slashdirt.org>
Thu, 20 Oct 2022 13:49:43 +0000 (15:49 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 15 May 2023 15:36:01 +0000 (17:36 +0200)
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
phase1/master.cfg

index d2e09e1e1d8d610bbb593f9394263f25862e3b52..f6e752f5723572d2d6ae4bc357f1e4aa2a5aa0e4 100644 (file)
@@ -90,7 +90,7 @@ for section in ini.sections():
        if section.startswith("worker "):
                if ini.has_option(section, "name") and ini.has_option(section, "password") and \
                   (not ini.has_option(section, "phase") or ini.getint(section, "phase") == 1):
-                       sl_props = { 'dl_lock':None, 'ul_lock':None, 'do_cleanup':False, 'shared_wd':True }
+                       sl_props = { 'dl_lock':None, 'ul_lock':None, 'do_cleanup':False }
                        name = ini.get(section, "name")
                        password = ini.get(section, "password")
                        if ini.has_option(section, "cleanup"):
@@ -105,9 +105,6 @@ for section in ini.sections():
                                sl_props['ul_lock'] = lockname
                                if lockname not in NetLocks:
                                        NetLocks[lockname] = locks.MasterLock(lockname)
-                       if ini.has_option(section, "shared_wd"):
-                               shared_wd = ini.getboolean(section, "shared_wd")
-                               sl_props['shared_wd'] = shared_wd
                        c['workers'].append(Worker(name, password, max_builds = 1, properties = sl_props))
 
 # PB port can be either a numeric port or a connection string
@@ -370,9 +367,6 @@ c['schedulers'].append(ForceScheduler(
 # what steps, and which workers can execute them.  Note that any particular build will
 # only take place on one worker.
 
-def IsSharedWorkdir(step):
-       return bool(step.getProperty("shared_wd"))
-
 def IsTaggingRequested(step):
        val = step.getProperty("tag")
        if val and re.match(r"^[0-9]+\.[0-9]+\.[0-9]+(?:-rc[0-9]+)?$", val):
@@ -505,8 +499,7 @@ for target in targets:
                description = "Setting up shared work directory",
                command = 'test -L "$PWD" || (mkdir -p ../shared-workdir && rm -rf "$PWD" && ln -s shared-workdir "$PWD")',
                workdir = ".",
-               haltOnFailure = True,
-               doStepIf = IsSharedWorkdir))
+               haltOnFailure = True))
 
        # find number of cores
        factory.addStep(SetPropertyFromCommand(