Bug 164979 - Remove webkitpy dependency on Eliza.
Summary: Remove webkitpy dependency on Eliza.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-18 18:55 PST by Dean Johnson
Modified: 2016-12-01 16:02 PST (History)
4 users (show)

See Also:


Attachments
proposed patch (6.53 KB, patch)
2016-12-01 14:46 PST, Alexey Proskuryakov
dbates: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Johnson 2016-11-18 18:55:26 PST
Eliza isn't used and the third-party module we rely on for it is hosted on a domain that we have no guarantees won't go down. If that domain was to go offline or the module stopped being hosted there, all webkitpy tests would cease to work on any machines that had not ran them before.
Comment 1 Alexey Proskuryakov 2016-12-01 14:46:38 PST
Created attachment 295901 [details]
proposed patch
Comment 2 Daniel Bates 2016-12-01 14:49:19 PST
Comment on attachment 295901 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=295901&action=review

OK.

> Tools/ChangeLog:8
> +        This module is not on pypi, so installing it is a challenge. The jokes feel pretty old too!

:D
Comment 3 Alexey Proskuryakov 2016-12-01 14:54:04 PST
Committed r209216.
Comment 4 Dean Johnson 2016-12-01 15:00:02 PST
Comment on attachment 295901 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=295901&action=review

I'm confused as to why Eliza was replaced with UnknownCommand... If it's a hotfix, we definitely should have a FIXME.

(Adding r+ so my comment doesn't push it back to r?)

> Tools/Scripts/webkitpy/thirdparty/__init___unittest.py:44
> +                self.buildbot_installed = True

Why was this changed from eliza to buildbot? I think all Eliza references should just be removed.

> Tools/Scripts/webkitpy/thirdparty/__init___unittest.py:53
> +            self.assertTrue(mock_import_hook.buildbot_installed)

Ditto.

> Tools/Scripts/webkitpy/tool/bot/ircbot.py:57
> +        return "%s: %s" % (nick, "...")

This doesn't seem like the right approach. Why is Eliza being replaced with UnknownCommand, and why does it return '...'? That doesn't seem user friendly.

If we want to do this as simply a "hotfix", there should definitely be a FIXME.

> Tools/Scripts/webkitpy/tool/bot/ircbot.py:78
> +            command = UnknownCommand

Ditto to above.

> Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py:37
> +from webkitpy.tool.bot.ircbot import UnknownCommand

Ditto.

> Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py:55
> +        self.assertEqual(bot._parse_command_and_args("   "), (UnknownCommand, [""]))

Ditto.
Comment 5 Alexey Proskuryakov 2016-12-01 15:31:09 PST
> I'm confused as to why Eliza was replaced with UnknownCommand... If it's a hotfix, we definitely should have a FIXME.

I don't know what I could write in such a FIXME. What other fix do you have in mind?

> Why was this changed from eliza to buildbot? I think all Eliza references should just be removed.

This code isn't testing eliza, it is testing that autoinstall hooks work. So, removing it would have removed important test coverage.

It doesn't matter which package to test against, eliza must have been picked randomly.
Comment 6 Dean Johnson 2016-12-01 15:41:55 PST
(In reply to comment #5)
> > I'm confused as to why Eliza was replaced with UnknownCommand... If it's a hotfix, we definitely should have a FIXME.
> 
> I don't know what I could write in such a FIXME. What other fix do you have
> in mind?
Maybe I first need to understand why you replaced it with UnknownCommand? It looks like an unnecessary stub that was put in place so minimal changes had to be done to remove Eliza. I think the right approach here would have been to remove Eliza and it's references, as well as the code built around Eliza to employ its use.
> 
> > Why was this changed from eliza to buildbot? I think all Eliza references should just be removed.
> 
> This code isn't testing eliza, it is testing that autoinstall hooks work.
> So, removing it would have removed important test coverage.
> 
> It doesn't matter which package to test against, eliza must have been picked
> randomly.
I see that now. I was wrong, everything seems correct there.
Comment 7 Alexey Proskuryakov 2016-12-01 16:02:04 PST
> Maybe I first need to understand why you replaced it with UnknownCommand? 

I think that the bot should respond with _something_ when it doesn't recognize the command, to avoid giving the impression that it's frozen.

Which exact thing to say is debatable. I went with "...", but something like "unknown command" would have worked too.