Closed Bug 115642 Opened 23 years ago Closed 21 years ago

[BUGZILLA] oopsbot should use XML to get bug information

Categories

(Webtools Graveyard :: Mozbot, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jacob, Assigned: bbaetz)

References

Details

Attachments

(1 file, 3 obsolete files)

Bugzilla.bm should use XML instead of trying to parse the HTML. Right now, xml.cgi exists. However, due to bug 109530 the results of using it aren't pretty. This bug has been fixed in CVS and as soon as b.m.o updates, it'll make those special characters appear correctly in ssdbot's output. However, the way it's done right now is only half-way. Because there is no way to get query results in XML it still has to parse HTML for the query interface: ssdbot: bugs &foo=bar&baz=snafu Once bug 103778 is fixed, the fix for bug 48707 should be trivial (Myk's words) which will allow Bugzilla.bm to go completely XML.
BTW, my current implimentation is to use the XML::LibXML package from CPAN which is much easier to work with the the expat based XML::Parser.
Assignee: ian → jake
Blocks: 111987
Depends on: 48707
Status: NEW → ASSIGNED
Whiteboard: 2.4
Target Milestone: --- → Mozbot 2.4
Pushing out to 2.6 because I'd like the relevant Bugzilla version to have been released well in advance of the relevant mozbot release.
Target Milestone: Mozbot 2.4 → Mozbot 2.6
QA Contact: timeless → kerz
*** Bug 133202 has been marked as a duplicate of this bug. ***
Summary: oopsbot should use XML to get bug information → [BUGZILLA] oopsbot should use XML to get bug information
Target Milestone: Mozbot 2.6 → Mozbot 2.8
Taking. The patch I'll attach is based on Jake's.
Assignee: jake → bbaetz
Status: ASSIGNED → NEW
Attached patch patch (obsolete) — Splinter Review
Jake's version which zach emailed me was not basde against current cvs. I don't think I mismerged anything...
That patch makes the "n bugs found" announcment even when it shouldn't - it should only do so if there was more than one bug and we weren't using the single query xml.cgi stuff. Is that correct?
Attached patch v2 (obsolete) — Splinter Review
Fixed that bug. cvs mozbot gets this wrong, btw: bug 1 bug 2 makes it say '2 bugs found'
Attachment #77015 - Attachment is obsolete: true
Hixie, review?
Keywords: patch, review
That's a big patch, it will take me a while to review, and I'm rather busy with university at the moment. I'll definitely take it for the next release, don't worry. (I also need to make sure it plays well with any fixes for the other Bugzilla module bugs.)
Summary: [BUGZILLA] oopsbot should use XML to get bug information → [HAVE FIX] oopsbot should use XML to get bug information
Whiteboard: 2.4
Target Milestone: Mozbot 2.8 → Mozbot 2.6
*** Bug 145384 has been marked as a duplicate of this bug. ***
thebot on irc.mozilla.org (#mozilla.de, #mozbot, #ui, #mozdev, #mozl10n) now uses the Bugzilla.pm module from cwbot that has bbaetz's patch. With the Bugzilla module from current mozbot CVS, I didn't get Bugzilla to work, but with bbaetz's module it works again...
Robert, you can also check out Bug 145384 which has an alterate approach to the problem (making the HTML parsing stronger) thus allowing it to work on any version of Bugzilla I've seen so far.
kiko: I've seen that bug. Anyway, I like the XML approach better because XML should be the format to exchange data between different formatting interfaces (and I would consider mozbot to be such an interface), HTML should only be the format to present data to a web browser (IMO).
Attached patch v2.1 (obsolete) — Splinter Review
Truncation of large responses was broken in a channel - this fixes that thinko.
Attachment #78096 - Attachment is obsolete: true
Comment on attachment 93281 [details] [diff] [review] v2.1 Had someone in #mozwebtools asking for this patch today... I looked it over and it all looks sensible to me (of course, some of the code is mine so I can't really r= it :). Making this an "official" review request.
Attachment #93281 - Flags: review?(ian)
I still insist we look at the alternate solution I implemented in Bug 145384 which is simpler, less intrusive, and makes mozbot work with *many* versions of Bugzilla (since I tested it myself in a number of them). What good is releasing a version of mozbot that requires you to upgrade *Bugzilla* to get it working?
kiko - this version works with old bugzillas, using html as a fallback. That triggers on teh contenttype for buglist.cgi, and rdf output was added at the same time as the html changed, so it should always work I do think that we should have both patches, though, just for robustness /me pokes hixie for review ;)
I will not be reviewing this until I have a chance to test it first-hand, which won't happen before I have a Linux installation, which for various technical reasons is not likely to happen before the end of the year. Sorry.
Hixie, it's past the end of the year. What's the status? :) Had people on IRC asking for this again.
Summary: [HAVE FIX] oopsbot should use XML to get bug information → [BUGZILLA] oopsbot should use XML to get bug information
Target Milestone: Mozbot 2.6 → ---
Attachment #93281 - Flags: review?(ian)
Attached patch v2.2Splinter Review
This is what ssdbot is currently using.
Attachment #93281 - Attachment is obsolete: true
Hixie told us the Bugzilla folks now had complete control over the Bugzilla.bm module. This has been in use on ssdbot (and other mozbots) for several months now and works just dandy. Calling somewhere between 6 and 15 months worth of production use good enough for a review and checking it in. :) Checking in BotModules/Bugzilla.bm; /cvsroot/mozilla/webtools/mozbot/BotModules/Bugzilla.bm,v <-- Bugzilla.bm new revision: 2.7; previous revision: 2.6 done
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Yeah, I'd been meaning to check this in for ages. There are some bugs it doens't parse, though - I'll have to look through irc logs for details. Thanks for doing this for me. (I'll doubel check that that is what I actually have locally, mind you)
QA Contact: kerz → mozbot
Target Milestone: --- → 2.6
Verified Fixed.
Status: RESOLVED → VERIFIED
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: