Page MenuHomePhabricator

Remove PhantomJS from the CI infrastructure
Closed, ResolvedPublic

Description

Timo commented how PhantomJS is a fork of some old webkit and serves no purposes nowadays. We originally went with PhantomJS because it was very easy to integrate. Nowadays we use browsers in XVFB, so we can get rid of PhantomJS entirely.

Event Timeline

hashar created this task.Sep 21 2015, 7:24 PM
hashar raised the priority of this task from to Needs Triage.
hashar updated the task description. (Show Details)
hashar added a subscriber: hashar.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 21 2015, 7:24 PM

Change 239914 had a related patch set uploaded (by Hashar):
Remove PhantomJS support from browser tests

https://gerrit.wikimedia.org/r/239914

greg added a subscriber: greg.Sep 24 2015, 3:44 PM

Just a note: the PhantomJS ability to send custom/non-standard headers was used by ZeroBanner. "Luckily" their tests aren't worthwhile anymore so we removed it. Doing custom headers is now not possible, right?

hashar added subscribers: zeljkofilipin, jhobs.

Yup so we wanted to T113280: Stop using PhantomJS for ZeroBanner browser test

Zeljko found out the tests are broken beyond repair/available resources and got rid of them T113463: Delete broken ZeroBanner browsertests Jenkins job after @jhobs +3ed the idea.

Regarding setting custom headers, @zeljkofilipin and I talked about it on Wednesday. I could not found out the Chrome API documentation nor how to set headers. So Zeljko took the lead and:

Looks like Selenium does not support adding custom headers, but some browser drivers support it, like phantomjs. Another alternative is to use a proxy like browsermob:
https://github.com/lightbody/browsermob-proxy/
https://github.com/jarib/browsermob-proxy-rb
https://github.com/AutomatedTester/browsermob-proxy-py

And no. We are not going to setup a proxy anytime soon. I guess if we ever want to do such feature switch, we would probably go with a cookie (assuming the browsers drivers let us set a cookie).

So now we can cleanup references to PhantomJS in the browser tests.

I found a bunch of references to it in integration/jenkins.git :-(

hashar set Security to None.
greg added a comment.Sep 24 2015, 9:53 PM

And no. We are not going to setup a proxy anytime soon. I guess if we ever want to do such feature switch, we would probably go with a cookie (assuming the browsers drivers let us set a cookie).

:-) Definitely, understood. That was pretty clear from what @zeljkofilipin told me during our 1:1.

I guess if we ever want to do such feature switch, we would probably go with a cookie (assuming the browsers drivers let us set a cookie).

Yes, Selenium does support setting cookies.

Change 239914 merged by jenkins-bot:
Remove PhantomJS support from browser tests

https://gerrit.wikimedia.org/r/239914

The browser test jobs no more rely on PhantomJS. Zerobanner tests have been deleted and Jan deployed the code cleanup.

Now have to investigate PhantomJS usage in integration/jenkins.git.

hashar triaged this task as Normal priority.Jan 6 2016, 8:58 PM
hashar moved this task from Untriaged to Backlog on the Continuous-Integration-Infrastructure board.
hashar closed this task as Resolved.Feb 12 2016, 11:38 AM
hashar assigned this task to Krinkle.

Removed by @Krinkle with fc91d25b2f5d801b7302a24c22286a19d9c3c4cd on December 9th 2015.