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

Travis issues logged but build passing #3084

Closed
ba66e77 opened this issue Sep 9, 2018 · 4 comments
Closed

Travis issues logged but build passing #3084

ba66e77 opened this issue Sep 9, 2018 · 4 comments

Comments

@ba66e77
Copy link
Contributor

ba66e77 commented Sep 9, 2018

In reviewing #3082 , the SQLSTATE message below was observed, even though Travis build still passed.

In Connection.php line 686:
                                                                               
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.key_value  
  ' doesn't exist: DELETE FROM {key_value}                                     
  WHERE (name IN (:db_condition_placeholder_0)) AND (collection = :db_conditi  
  on_placeholder_1); Array                                                     
  (                                                                            
      [:db_condition_placeholder_0] => drupal_css_cache_files                  
      [:db_condition_placeholder_1] => state                                   
  )                                                                            
                                                                               
In Statement.php line 59:
                                                                               
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal.key_value  
  ' doesn't exist                                                              

Looking into that one, @lcatlett determined the issue was not introducted in #3082 and also noticed a co-occurring issue:

Warning: include(../../scripts/phpunit/bootstrap.php): failed to open stream: No such file or directory in /home/travis/build/acquia/blt/tests/phpunit/bootstrap.php on line 8
Warning: include(): Failed opening '../../scripts/phpunit/bootstrap.php' for inclusion (include_path='.:/home/travis/.phpenv/versions/7.1.11/share/pear') in /home/travis/build/acquia/blt/tests/phpunit/bootstrap.php on line 8
PHP Warning:  include(../../scripts/phpunit/bootstrap.php): failed to open stream: No such file or directory in /home/travis/build/acquia/blt/tests/phpunit/bootstrap.php on line 8
PHP Warning:  include(): Failed opening '../../scripts/phpunit/bootstrap.php' for inclusion (include_path='.:/home/travis/.phpenv/versions/7.1.11/share/pear') in /home/travis/build/acquia/blt/tests/phpunit/bootstrap.php on line 8
Bootstrapping BLT testing framework...
To prevent recreation of sandbox master on each bootstrap, set BLT_RECREATE_SANDBOX_MASTER=0
Creating master sandbox in /tmp/blt-sandbox-master...
Loading composer repositories with package information

This is occurring in both 9.x and 9.2.x versions. I've tracked the issue back as far as the 9.1.1 release, but have not yet determined the PR withing that release where it first arose.

@ba66e77 ba66e77 added Bug Something isn't working 9.1.x labels Sep 9, 2018
@ba66e77
Copy link
Contributor Author

ba66e77 commented Sep 9, 2018

The PHPUnit warning at least was introduced in commit 79be8c8, apparently on this line

include '../../scripts/phpunit/bootstrap.php';
.

My gut is that it's only coincidental to the SQLSTATE message, since I can't see how failure to find an include file would cause the SQL problem. But that's just a hunch at this point.

@lcatlett
Copy link
Contributor

lcatlett commented Sep 9, 2018

@ba66e77 I was taking a look at the SQLSTATE message issue and it looks like it is due to the cr added in #652. In reviewing past closed issues and associated BLT commands / bugfixes, having this cr has resulted in some difficult to debug deploy and update issues and in some cases there are workarounds (such as importing config or features twice) that can be refactored in BLT once this is fixed.

Resolving this is particularly important for ACSF and multisite projects since running a cr in the middle of a deploy / update can break tasks that are intended to be asynchronous when wips are running concurrently and transactions that must be isolated per site.

This was one of the things fixed in #3006 that was reverted, specifically a83b8e0 , 7404038, and d57600f

In taking a quick look again, we will likely see additional improvements from adding a flush of the service container. Do you want me to create a separate bug to track this bug while the fixes are in progress, or just update this one?

@ba66e77
Copy link
Contributor Author

ba66e77 commented Sep 10, 2018

I still don't see how a cr would generate this problem, but now that it seems we can reliably replicate the problems previously associated with a cr if we had a PR that removed the cr and resolved this SQLSTATE issue that would sell me. But, yeah, as you said if we take out that cr we'd need to deal with the service container issue that #652 was put in to address.

@danepowell
Copy link
Contributor

SQLSTATE appears to come from here:

$this->drush('cache-rebuild --no-cache-clear', NULL, FALSE);

The fact that it's not failing the build is expected, since we explicitly allow that command to fail. We must have known it was flaky when we implemented it in #2456

The error is easily fixed by removing the cache rebuild: #3474. This will also do wonders to aid with #3436 (it reduces log output by 15%, or 1500 lines)

To the other points in this thread:

@danepowell danepowell removed the Bug Something isn't working label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants