Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to travis trusty dist #7092

Closed
wants to merge 4 commits into from

Conversation

dhensby
Copy link
Contributor

@dhensby dhensby commented Jun 29, 2017

#7091 but on master

@tractorcow
Copy link
Contributor

Oh cool :D

@dhensby
Copy link
Contributor Author

dhensby commented Jun 29, 2017

It looked like behat had problems too - lets see if it works on master

@tractorcow
Copy link
Contributor

Oh no, pear again. =(

@dhensby
Copy link
Contributor Author

dhensby commented Jun 29, 2017

Selenium doesn't seem to be working either :/

@dhensby
Copy link
Contributor Author

dhensby commented Jun 29, 2017

pear install seems fine

@tractorcow
Copy link
Contributor

If you push to the open-sourcerer fork, you'll get artifacts upload to aws. Then you can download selenium.log.

@tractorcow
Copy link
Contributor

Ok, I've re-enabled travis and added you with write permissions to https://github.com/open-sausages/silverstripe-framework

@dhensby
Copy link
Contributor Author

dhensby commented Jun 29, 2017

gah - I'm not sure I have the motivation to look into this. the speed improvements on trusty look variable at best...

I think I'll have more luck trying to get selenium running on a local trusty vm first

@tractorcow
Copy link
Contributor

I've found that there are some additional behat breakages caused by a recent release of php-webdriver module.

Fix is at instaclick/php-webdriver#79

@dhensby dhensby force-pushed the pulls/4/trusty-travis branch from b8dbb60 to a2f6706 Compare June 30, 2017 12:32
@dhensby
Copy link
Contributor Author

dhensby commented Jun 30, 2017

still no luck

@tractorcow
Copy link
Contributor

tractorcow commented Jul 2, 2017

Errors remind me why I stopped using pear. Try composer-install instead?

@dhensby dhensby force-pushed the pulls/4/trusty-travis branch from a2f6706 to 309757b Compare July 3, 2017 11:08
@dhensby
Copy link
Contributor Author

dhensby commented Jul 3, 2017

the behat tests not running are really the big issue here, but I've pushed an attempted fix to use composer to install codesniffer

@dhensby dhensby force-pushed the pulls/4/trusty-travis branch 2 times, most recently from 1797d33 to 3dfbcd6 Compare July 3, 2017 12:48
@dhensby
Copy link
Contributor Author

dhensby commented Jul 5, 2017

I've tried to get selenium running on a local trust vm and can't - so I'm going to bail at this point. If anyone has any ideas of how to fix this on travis, then please take a look, otherwise I'll close this.

@dhensby
Copy link
Contributor Author

dhensby commented Jul 19, 2017

@chillu do you have any interest in investigating the selenium issues?

@dhensby dhensby changed the base branch from master to 4 July 19, 2017 16:59
@dhensby dhensby force-pushed the pulls/4/trusty-travis branch from 3dfbcd6 to c6858ae Compare July 19, 2017 17:04
composer.json Outdated
@@ -94,8 +95,8 @@
"thirdparty/"
],
"scripts": {
"lint": "phpcs src/ tests/php",
"lint-clean": "phpcbf src/ tests/php",
"lint": "vendor/bin/phpcs src/ tests/php",
Copy link
Contributor

@tractorcow tractorcow Jul 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't going to work if framework isn't root, meaning these scripts are no longer useful to devs. Can you set the $PATH alias to vendor/bin instead in .travis.yml?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@dhensby dhensby force-pushed the pulls/4/trusty-travis branch 2 times, most recently from b02374a to 118dd37 Compare July 20, 2017 10:13
@dhensby dhensby force-pushed the pulls/4/trusty-travis branch 5 times, most recently from ce3178c to ba1a354 Compare July 21, 2017 15:44
@tractorcow tractorcow added this to the Recipe 4.0.0 milestone Sep 6, 2017
@tractorcow
Copy link
Contributor

tractorcow commented Sep 6, 2017

Selenium is falling apart on our build, so I'm triaging and milestoning this for 4.0 stable.

I've also raised sveneisenschmidt/selenium-server-standalone#30

@tractorcow
Copy link
Contributor

Looks like we need to install geckodriver to get support for firefox... I'll try to set this up before I dismiss the possibility immediately. :)

@tractorcow
Copy link
Contributor

tractorcow commented Sep 6, 2017

Latest ESR is 52 of firefox.... we may need to lock our expected browser requirements to that (currently it's requesting v 9!)


  ┌─ @BeforeScenario # SilverStripe\Framework\Tests\Behaviour\FeatureContext::before()
  │
  ╳  Could not open connection: TypeError: Given browserVersion [object String] "9", but current version is [object String] "55.0.3"
  ╳  Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z'

@dhensby
Copy link
Contributor Author

dhensby commented Sep 6, 2017

OK - I've rerun the suite and it's still failing - I'm just at the point where I'm not really sure how to proceed... @tractorcow do you want to take it on from here?

@tractorcow
Copy link
Contributor

Yep I'm still working on it... there is quite a bit left to do (E.g. setup geckdriver, mink configuration upgrades)

@tractorcow tractorcow self-assigned this Sep 7, 2017
@tractorcow
Copy link
Contributor

tractorcow commented Sep 7, 2017

It looks like this could be the cause of recent failures on travis precise dist:

With all incoming jobs defaulted to dist: trusty, the remaining transition we will be
focusing on is phasing out our container-based infrastructure for dist: precise jobs.
This rollout will be similar to the dist: trusty defaulting, but instead of setting a
default value, we will begin ignoring sudo: false when we find an explicit
dist: precise.

From https://blog.travis-ci.com/

@dhensby
Copy link
Contributor Author

dhensby commented Sep 7, 2017

what a pain :/

@tractorcow
Copy link
Contributor

New issue, https://github.com/instaclick/php-webdriver doesn't work with selenium 3.

@tractorcow
Copy link
Contributor

My next step would be to fork MinkSelenium2Driver module and update support for selenium3. Not going to do that now though; Maybe next hackday?

@tractorcow
Copy link
Contributor

I've setup a fork for working:

{
    "name": "silverstripe/installer",
    "type": "silverstripe-recipe",
    "description": "The SilverStripe Framework Installer",
    "require": {
        "php": ">=5.6.0",
        "silverstripe/recipe-plugin": ">=0.1@dev <1.0",
        "silverstripe/recipe-cms": "1.0.x-dev",
        "silverstripe-themes/simple": "~3.2.0",
        "silverstripe/serve": "dev-master",
        "se/selenium-server-standalone": "3.5.3",
        "behat/mink-selenium2-driver": "2.0.x-dev",
        "silverstripe/behat-extension": "3.1.x-dev"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:open-sausages/MinkSelenium2Driver.git"
        },
        {
            "type": "vcs",
            "url": "git@github.com:open-sausages/silverstripe-behat-extension.git"
        }
    ]
}

@tractorcow
Copy link
Contributor

My progress on upgrading to facebook webdriver:

image

@chillu
Copy link
Member

chillu commented Sep 11, 2017

Just getting my head around this - here's the chain of events as far as I can tell:

  1. Travis limited precise support (removed sudo:false), need to move to trusty. Travis will remove precise support completely next April.
  2. We need sudo: false to run on container-based infrastructure for fast builds (explanation). We could switch to sudo: required to stay on trusty, but that'll slow down builds
  3. trusty doesn’t support old Firefox releases, need to move to ESR
  4. Selenium 2 doesn't support Firefox ESR, need to update to Selenium 3
  5. mink-selenium2-driver doesn’t support Firefox on Selenium 3, shift to Chrome?
  6. php-webdriver doesn’t support Selenium 3, fork and fix?

@tractorcow The above is an updated version compared to what I posted on Slack.

@tractorcow
Copy link
Contributor

It looks like some of the issues I noticed upgrading to selenium3 were my own fault; Regarding php-webdriver/php-webdriver#468, you should only need to set --enablePassThrough false when starting selenium.

@tractorcow
Copy link
Contributor

tractorcow commented Sep 12, 2017

@tractorcow
Copy link
Contributor

Also followed minkphp/Mink#158; The lack of this core API means having to upgrade various behat contexts to support facebook/webdriver directly (and undesirably).

chillu added a commit to chillu/silverstripe-cms that referenced this pull request Sep 12, 2017
See silverstripe/silverstripe-framework#7092 for context. Trying out how this will go down on Behat tests in 3.x without further changes.
chillu added a commit to chillu/silverstripe-framework that referenced this pull request Sep 12, 2017
chillu added a commit to chillu/silverstripe-framework that referenced this pull request Sep 12, 2017
@chillu
Copy link
Member

chillu commented Sep 12, 2017

Note that I've switched to trusty without any other changes on cms, with successful builds: https://travis-ci.org/silverstripe/silverstripe-cms/jobs/274442114

I've created PRs to do a straight-up switch to precise for framework - just to see what the actual problem is (that's not mentioned in this thread AFAICT):

3.x PR for framework: #7366
4.x PR for framework: #7367

My theory is that we just need to pin the Firefox dependency to something that still supports Selenium 2.

@chillu
Copy link
Member

chillu commented Sep 12, 2017

So those builds both fail with:

[Behat\Mink\Exception\DriverException]                                                                                         
  Exception has been thrown in "beforeScenario" hook, defined in SilverStripe\Framework\Test\Behaviour\FeatureContext::before()  
  Could not open connection: Unable to connect to host localhost on port 7055 after 45000 ms. Firefox console output:            
  nf-WARNING **: Client failed to connect to the D-BUS daemon:                                                                   
  //bin/dbus-launch terminated abnormally without any error message      

3.x: https://travis-ci.org/silverstripe/silverstripe-framework/jobs/274445959
4.x: https://travis-ci.org/silverstripe/silverstripe-framework/jobs/274446637

Now I'm updating them with a pinned Firefox version (31.0, same as cms travis config) and see if that's any different.

@tractorcow
Copy link
Contributor

More bad news, looks like upgrading to facebook/php-webdriver is blocked by php-webdriver/php-webdriver#462.

@chillu
Copy link
Member

chillu commented Sep 12, 2017

OK, both those builds have passed - so the only thing that was necessary to fix this (apart from switching to trusty in the first place) was pinning of the FIrefox version we already had on CMS.

Selenium states that it's supporting the current Firefox ESR - which would be v52 at the moment. I haven't seen any notice about Selenium 2 being unsupported (nothing mentioned in the announcement). It'll become increasingly infeasible to stay on Selenium 2, but looks like we don't have an immediate problem there.

There's a PoC with Behat/Mink in Chrome Headless, which is said to be 3x as fast as the equivalent through Selenium - so that's promising. And it would mean we skip Selenium entirely (no longer needing Java would be nice...). I'm happy to keep going on Selenium 2 for a while and hope that someone gets to a stable version of that PoC in the meantime :D

@tractorcow tractorcow closed this Sep 12, 2017
@tractorcow
Copy link
Contributor

Replaced with #7367

@dhensby dhensby deleted the pulls/4/trusty-travis branch September 12, 2017 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants