Repository: buildbot/buildbot

Issue:
REST API filtering with lists doesn't work
This ticket is a migrated Trac ticket [3413](http://trac.buildbot.net/ticket/3413)

People contributed to the original ticket: @hawkowl, @djmitche, @tardyp
Ticket created on: `Jan 18 2016`
Ticket last modified on: `Jan 21 2016`

---

`builders?tags__eq=sometag` should filter for builders tagged "sometag".  It doesn't.


---

_Comment from_: @dustin
_Date_: `Jan 20 2016`

https://github.com/buildbot/buildbot/pull/1954

---
_Comment from_: @tardyp
_Date_: `Jan 21 2016`

Please don't close yet, as we need to implement the equivalent filtering on the client, for automatic update

---
_Comment from_: @dustin
_Date_: `Jan 21 2016`

OK, leaving open




Discussion:

Resolving patch:
diff --git a/master/buildbot/steps/source/git.py b/master/buildbot/steps/source/git.py
--- a/master/buildbot/steps/source/git.py
+++ b/master/buildbot/steps/source/git.py
@@ -573,7 +573,7 @@ def applyAlready(res):
         return d
 
     def _sourcedirIsUpdatable(self):
-        if self.slaveVersionIsOlderThan('listdir', '2.17'):
+        if self.slaveVersionIsOlderThan('listdir', '2.16'):
             d = self.pathExists(self.build.path_module.join(self.workdir, '.git'))
 
             def checkWithPathExists(exists):
diff --git a/master/buildbot/steps/source/svn.py b/master/buildbot/steps/source/svn.py
--- a/master/buildbot/steps/source/svn.py
+++ b/master/buildbot/steps/source/svn.py
@@ -74,6 +74,14 @@ def startVC(self, branch, revision, patch):
         self.method = self._getMethod()
         self.stdio_log = self.addLogForRemoteCommands("stdio")
 
+        # if the version is new enough, and the password is set, then obfuscate it
+        if self.password is not None:
+            if not self.slaveVersionIsOlderThan('shell', '2.16'):
+                self.password = ('obfuscated', self.password, 'XXXXXX')
+            else:
+                log.msg("Slave does not understand obfuscation; "
+                        "svn password will be logged")
+
         d = self.checkSvn()
 
         def checkInstall(svnInstalled):
@@ -182,7 +190,7 @@ def copy(self):
             if self.username:
                 export_cmd.extend(['--username', self.username])
             if self.password is not None:
-                export_cmd.extend(['--password', ('obfuscated', self.password, 'XXXXXX')])
+                export_cmd.extend(['--password', self.password])
             if self.extra_args:
                 export_cmd.extend(self.extra_args)
             export_cmd.extend(['source', self.workdir])
@@ -212,7 +220,7 @@ def _dovccmd(self, command, collectStdout=False, abandonOnFailure=True):
         if self.username:
             command.extend(['--username', self.username])
         if self.password is not None:
-            command.extend(['--password', ('obfuscated', self.password, 'XXXXXX')])
+            command.extend(['--password', self.password])
         if self.depth:
             command.extend(['--depth', self.depth])
         if self.extra_args:
diff --git a/slave/buildslave/commands/base.py b/slave/buildslave/commands/base.py
--- a/slave/buildslave/commands/base.py
+++ b/slave/buildslave/commands/base.py
@@ -70,7 +70,8 @@
 #  >= 2.14: RemoveDirectory can delete multiple directories
 #  >= 2.15: 'interruptSignal' option is added to SlaveShellCommand
 #  >= 2.16: 'sigtermTime' option is added to SlaveShellCommand
-#  >= 2.17: listdir command added to read a directory
+#  >= 2.16: runprocess supports obfuscation via tuples (#1748)
+#  >= 2.16: listdir command added to read a directory
 
 
 class Command:


Test patch: