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

Behat test failure with default/OOTB BLT install through GitHub/Acquia Pipelines #805

Closed
geerlingguy opened this issue Dec 18, 2016 · 16 comments
Labels
Support A support request

Comments

@geerlingguy
Copy link
Contributor

My system information:

  • Operating system type: macOS
  • Operating system version: 10.12.2
  • BLT version: 8.6.1

When I run this command:

  • Trigger a Pipelines build by creating a PR on my GitHub repo.

I get the following output:

text\DrupalContext::assertCron()
	    And I visit "/user/logout"                                                      # Drupal\DrupalExtension\Context\MinkContext::assertAtPath()
	    And I visit "/foobar"                                                           # Drupal\DrupalExtension\Context\MinkContext::assertAtPath()
	    Then I should not see "Access denied"                                           # Drupal\DrupalExtension\Context\MinkContext::assertPageNotContainsText()
	
	34 scenarios (32 passed, 2 undefined)
	219 steps (212 passed, 4 undefined, 3 skipped)
	2m33.05s (62.91Mb)
	
	--- Drupal\FeatureContext has missing steps. Define them with these snippets:
	
	    /**
	     * @When I describe the node.full view mode:
	     */
	    public function iDescribeTheNodeFullViewMode(PyStringNode $string)
	    {
	        throw new PendingException();
	    }
	
	    /**
	     * @When I customize the RSS display of the page node type
	     */
	    public function iCustomizeTheRssDisplayOfThePageNodeType()
	    {
	        throw new PendingException();
	    }
	
	    /**
	     * @When I configure the RSS display of the page node type
	     */
	    public function iConfigureTheRssDisplayOfThePageNodeType()
	    {
	        throw new PendingException();
	    }
	
	    /**
	     * @Then I should not see a :arg1 field
	     */
	    public function iShouldNotSeeAField($arg1)
	    {
	        throw new PendingException();
	    }
	
	  [foreach] /mnt/tmp/local.prod/source/vendor/acquia/blt/phing/tasks/tests.xml:71:8: /mnt/tmp/local.prod/source/vendor/acquia/blt/phing/tasks/tests.xml:86:1: Behat exited with code 1
	
	BUILD FAILED
	/mnt/tmp/local.prod/source/vendor/acquia/blt/phing/tasks/tests.xml:13:31: Execution of the target buildfile failed. Aborting.
	
	Total time: 4 minutes  19.99 seconds
	Error executing pipelines script step "run-tests".
================================================================================

And I expected this to happen:

  • Tests should pass.

Note that this was a plain/vanilla BLT install; I haven't done anything except for change the project name in the blt/project.yml file, and just installed pipelines and ran the ci:pipelines:init command to generate the acquia-pipelines.yml file.

@geerlingguy
Copy link
Contributor Author

Apparently this is an upstream bug in Lightning, New LightningExtension subcontexts do not autoload. See associated fix using Lightning 2.0.x from acquia/lightning: #807

Note that I'm on 8.1.15, and still seeing this issue, so I can't just apply the patch from #807 directly.

@grasmash grasmash added the Bug Something isn't working label Dec 19, 2016
@geerlingguy
Copy link
Contributor Author

I just tried pinning back to Lightning 8.1.14, and my build test still failed on the same issue :(

@geerlingguy
Copy link
Contributor Author

BLT just released 8.6.2 (technically still going through some testing as of this comment), so I'm going to update and see if that just works.

@balsama
Copy link
Contributor

balsama commented Dec 19, 2016

I just tried pinning back to Lightning 8.1.14, and my build test still failed on the same issue :(

This change causing this failure was introduced in 1.14/2.0.0. 1.13 was the last release without it.

@geerlingguy
Copy link
Contributor Author

@balsama - Ah, well that makes sense then :)

I'll report back how the BLT 8.6.2 update goes. If that fails for me, I'll try 1.13.

@geerlingguy
Copy link
Contributor Author

Following the official upgrade instructions, I'm now hitting the following error:

$ composer update
Gathering patches for root package.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Removing drupal/multiversion (8.1.0-alpha12)
  - Installing drupal/multiversion (1.0.0-alpha12)
    Loading from cache

  - Applying patches for drupal/multiversion

                              
  [ErrorException]            
  Array to string conversion  

That patch seems to be part of Lightning 8.1.15, which isn't yet updated at this point of the process...

@geerlingguy
Copy link
Contributor Author

So... this is starting to be a secondary issue, but I tried running composer update from 8.6.1 instead of the recommended command in the upgrade docs... and I'm still getting the above exception any time I tried composer update again.

@geerlingguy
Copy link
Contributor Author

I'm testing the updated manual update instructions in the 8.6.2 release notes:

composer update
rm composer.lock
composer install

And will also update to 8.6.3 to get the rest of the latest goodness.

@geerlingguy
Copy link
Contributor Author

That seems to have updated BLT to 8.6.3, but nothing else (Lightning is still stuck at 8.1.5).

@geerlingguy
Copy link
Contributor Author

I'm trying the following to upgrade from 8.6.1:

  1. composer require acquia/blt:8.6.2 (otherwise all the dependencies don't seem to get updated in composer.json).
  2. rm -f composer.lock
  3. composer update (this threw the Array to string conversion error again)
  4. composer require acquia/blt:^8.6 (to try to switch back to latest 8.6.x release).

At this point, I got Your requirements could not be resolved to an installable set of packages., with the below problems:

  Problem 1
    - The requested package drupal/acquia_connector (installed at 8.1.7, required as ^1.5.0) is satisfiable by drupal/acquia_connector[8.1.7] but these conflict with your requirements or minimum-stability.
  Problem 2
    - The requested package drupal/acsf (installed at 8.1.34, required as ^1.32.0) is satisfiable by drupal/acsf[8.1.34] but these conflict with your requirements or minimum-stability.
  Problem 3
    - The requested package drupal/features (installed at 8.3.2, required as ^3.0.0) is satisfiable by drupal/features[8.3.2] but these conflict with your requirements or minimum-stability.
  Problem 4
    - Can only install one of: drupal/workspace[1.0.0-alpha4, 8.1.0-alpha4].
    - Can only install one of: drupal/workspace[1.0.0-alpha4, 8.1.0-alpha4].
    - acquia/lightning 2.0.1 requires drupal/workspace 1.0.0-alpha4 -> satisfiable by drupal/workspace[1.0.0-alpha4].
    - Installation request for acquia/lightning 2.0.1 -> satisfiable by acquia/lightning[2.0.1].
    - Installation request for drupal/workspace (installed at 8.1.0-alpha4) -> satisfiable by drupal/workspace[8.1.0-alpha4].

Note that if you get all kinds of crazy things screwed up at some point, be sure to run a composer install from a known good state, then it will revert things back to that point in your codebase :) Also, you can do a git reset --hard to go back to a fresh local workspace, git-wise.

@geerlingguy
Copy link
Contributor Author

geerlingguy commented Dec 20, 2016

Okay, this time I did:

rm -f composer.lock
composer update
rm -f composer.lock
composer install

And I'm still getting:

Patches already gathered. Skipping
  - Removing drupal/multiversion (8.1.0-alpha12)
  - Installing drupal/multiversion (1.0.0-alpha12)
    Loading from cache

  - Applying patches for drupal/multiversion

                              
  [ErrorException]            
  Array to string conversion  

Which is related to this bug in the composer-patches project: cweagans/composer-patches#38 (see PR: cweagans/composer-patches#92).

@geerlingguy
Copy link
Contributor Author

Ah... then after that failed composer install, I ran composer install once more... and now it works?

@geerlingguy
Copy link
Contributor Author

So, even after all that, committing the code, then pushing it up to a new PR, Pipelines is still giving me:

	34 scenarios (32 passed, 2 undefined)
	219 steps (212 passed, 4 undefined, 3 skipped)
	2m19.79s (62.90Mb)
	
	--- Drupal\FeatureContext has missing steps. Define them with these snippets:
	
	    /**
	     * @When I describe the node.full view mode:
	     */
	    public function iDescribeTheNodeFullViewMode(PyStringNode $string)
	    {
	        throw new PendingException();
	    }
	
	    /**
	     * @When I customize the RSS display of the page node type
	     */
	    public function iCustomizeTheRssDisplayOfThePageNodeType()
	    {
	        throw new PendingException();
	    }
	
	    /**
	     * @When I configure the RSS display of the page node type
	     */
	    public function iConfigureTheRssDisplayOfThePageNodeType()
	    {
	        throw new PendingException();
	    }
	
	    /**
	     * @Then I should not see a :arg1 field
	     */
	    public function iShouldNotSeeAField($arg1)
	    {
	        throw new PendingException();
	    }
	
	  [foreach] /mnt/tmp/local.prod/source/vendor/acquia/blt/phing/tasks/tests.xml:71:8: /mnt/tmp/local.prod/source/vendor/acquia/blt/phing/tasks/tests.xml:86:1: Behat exited with code 1
	
	BUILD FAILED
	/mnt/tmp/local.prod/source/vendor/acquia/blt/phing/tasks/tests.xml:13:31: Execution of the target buildfile failed. Aborting.

@grasmash
Copy link
Contributor

Yeah, forgot to update acquia-pipelines.yml. #816

@geerlingguy
Copy link
Contributor Author

@grasmash pointed me to https://github.com/acquia/blt/pull/816/files, and adding that change to my pipelines file made everything finally work!

So in the end, to upgrade from 8.6.1 to 8.6.3, I ran:

rm -f composer.lock
composer update
rm -f composer.lock
composer install
composer install

Then I changed the pipelines file, and now the upgrade is complete and everything works within Pipelines.

@grasmash
Copy link
Contributor

New update instructions are:

composer update
composer nuke

This takes care of the rm -f composer.lock and composer install steps.

@grasmash grasmash added Support A support request and removed Bug Something isn't working labels Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support A support request
Projects
None yet
Development

No branches or pull requests

3 participants