Ticket #220 (closed defect: fixed)

Opened 5 years ago

Last modified 3 years ago

IRC status does not like builders with spaces in them

Reported by: TTimo Owned by: ashcrow
Priority: major Milestone: 0.7.12
Version: 0.7.6 Keywords: sprint
Cc:

Description

buildbot 0.7.7

I have several builders with spaces in their names (for instance 'Windows build'), and the IRC bot doesn't understand statements such as:

bot: watch Windows build or bot: watch 'Windows build'

Change History

comment:1 Changed 5 years ago by warner

yeah, that's because the irc-commadn parser is splitting on spaces. I'd suggest not using spaces in your builder names, and we should implement the separate "builder description string" (as a space-friendly adjunct to the builder name) described in #248 and #10. At least that description string would let you make the waterfall page look better (by using the description string instead of the builder name as the column heading)

comment:2 Changed 4 years ago by dustin

  • Milestone changed from undecided to 0.7.+

comment:3 Changed 4 years ago by ipv6guru

  • Keywords sprint added

comment:4 Changed 4 years ago by ipv6guru

  • Milestone changed from 0.7.+ to 0.7.11

comment:5 Changed 4 years ago by ashcrow

  • Owner set to ashcrow
  • Status changed from new to accepted

comment:6 Changed 4 years ago by ashcrow

I'll see if I can get one space in the name to be valid. To allow for spaces in general we will need to decide to either create a general parser that understands input or settle on a quoting standard for use.

comment:7 Changed 4 years ago by ashcrow

After looking a bit more into it I think it might be simpler to allow grouping with " or ' like so

bot: force build "my builder"

or

bot: watch 'some builder'

comment:8 Changed 4 years ago by dustin

This sounds good. I want to say there's something in the Python standard library that will split a quoted string like that, but I may be thinking of Amanda::Util::split_quoted_string .. sometimes all of my projects blur together :)

comment:9 Changed 4 years ago by ashcrow

I wrote a regex splitter which should do the job ...

rx = re.compile("['"]+(?:[^'"]+)['"]+|(?:[^ '"]+)")

I just need to write it together and test :-)

comment:10 Changed 4 years ago by dustin

  • Milestone changed from 0.7.11 to 0.7.12

comment:11 Changed 3 years ago by dustin

Shlex is the utility that does this. It's already in use for the 'force' subcommand, so it should be easy enough to add it for the 'watch' subcommand.

comment:12 Changed 3 years ago by dustin

commit 0c51ff9e5b3e358d3f2e268f5f3cf81a9ac1eb3f
Author: Dustin J. Mitchell <dustin@zmanda.com>
Date:   Sat Dec 19 09:49:32 2009 -0600

    (fixes #220) use shlex.split everywhere in the IRC bot

comment:13 Changed 3 years ago by dustin

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.