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

sql/test_data_second_domain.mysql - Always use matching version #17734

Closed
wants to merge 2 commits into from

Conversation

totten
Copy link
Member

@totten totten commented Jul 2, 2020

Overview

The file test_data_second_domain.mysql is used by some test scripts to create extra sample data (i.e. in addition to the default domain, this creates a secondary domain). It has a stale element which caused some confusion in #17729.

Before

test_data_second_domain.mysql has a hard-coded version number. It is very stale. This creates a nonsensical configuration where there are two domains but they are flagged with different versions.

After

When creating the secondary domain, it uses the same version as the main domain.

@civibot
Copy link

civibot bot commented Jul 2, 2020

(Standard links)

@totten
Copy link
Member Author

totten commented Jul 2, 2020

Note: For r-run, I did a little manual inspection, ie run unit-test (env CIVICRM_UF=UnitTests phpunit6 tests/phpunit/CRM/Core/RegionTest.php). Afterwards, inspect the resulting test DB (echo 'select id, version from civicrm_domain' | cv sql --test).

@colemanw
Copy link
Member

colemanw commented Jul 2, 2020

This is good.

@seamuslee001
Copy link
Contributor

I rebased this after the merge from 5.27 so should be good to go now

@seamuslee001
Copy link
Contributor

@totten failure was

Found EXITCODES=""
~/bknix-dfl/build/core-17734-4djw3/web/sites/all/modules/civicrm/ext/sequentialcreditnotes ~/workspace/CiviCRM-Core-PR@3
TAP version 13
PHPUnit 6.5.14 by Sebastian Bergmann and contributors.


                                                                                                                                        
  [CRM_Core_Exception]                                                                                                                  
  Found installation canary. This suggests that something went wrong with tracking installation process. Please post to forum or JIRA.  
                                                                                                                                        

php:boot [--level LEVEL] [-t|--test] [-U|--user USER]

PHP Fatal error:  Uncaught RuntimeException: Command failed (cv php:boot --level=full):
 in /home/jenkins/bknix-dfl/build/core-17734-4djw3/web/sites/all/modules/civicrm/Civi/Test/CiviTestListener.php:235
Stack trace:
#0 /home/jenkins/bknix-dfl/build/core-17734-4djw3/web/sites/all/modules/civicrm/Civi/Test/CiviTestListener.php(183): Civi\Test\CiviTestListener->cv('cv php:boot --l...', 'phpcode')
#1 /home/jenkins/bknix-dfl/build/core-17734-4djw3/web/sites/all/modules/civicrm/Civi/Test/CiviTestListener.php(48): Civi\Test\CiviTestListener->autoboot(Array)
#2 phar:///home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar/phpunit/Framework/TestResult.php(368): Civi\Test\CiviTestListener->startTestSuite(Object(PHPUnit\Framework\TestSuite))
#3 phar:///home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar/phpunit/Framework/TestSuite.php(689): PHPUnit\Framework\TestResult->startTestSuite(Object(PHPUnit\Framework\TestSuite))
#4 phar:///home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar/phpunit/Framework/TestSuite.php(755): PHPUnit\Framewo in /home/jenkins/bknix-dfl/build/core-17734-4djw3/web/sites/all/modules/civicrm/Civi/Test/CiviTestListener.php on line 235

Fatal error: Uncaught RuntimeException: Command failed (cv php:boot --level=full):
 in /home/jenkins/bknix-dfl/build/core-17734-4djw3/web/sites/all/modules/civicrm/Civi/Test/CiviTestListener.php on line 235

RuntimeException: Command failed (cv php:boot --level=full):
 in /home/jenkins/bknix-dfl/build/core-17734-4djw3/web/sites/all/modules/civicrm/Civi/Test/CiviTestListener.php on line 235

Call Stack:
    0.0012     523304   1. {main}() /home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar:0
    0.0470    9370496   2. PHPUnit\TextUI\Command::main() /home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar:570
    0.0470    9379288   3. PHPUnit\TextUI\Command->run() phar:///home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar/phpunit/TextUI/Command.php:148
    0.1482   10950832   4. PHPUnit\TextUI\TestRunner->doRun() phar:///home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar/phpunit/TextUI/Command.php:195
    0.1488   11020408   5. PHPUnit\Framework\TestSuite->run() phar:///home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar/phpunit/TextUI/TestRunner.php:545
    0.1489   11021008   6. PHPUnit\Framework\TestSuite->run() phar:///home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar/phpunit/Framework/TestSuite.php:755
    0.1506   11021328   7. PHPUnit\Framework\TestResult->startTestSuite() phar:///home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar/phpunit/Framework/TestSuite.php:689
    0.1506   11021328   8. Civi\Test\CiviTestListener->startTestSuite() phar:///home/jenkins/bknix-dfl/extern/phpunit6/phpunit6.phar/phpunit/Framework/TestResult.php:368
    0.1506   11022080   9. Civi\Test\CiviTestListener->autoboot() /home/jenkins/bknix-dfl/build/core-17734-4djw3/web/sites/all/modules/civicrm/Civi/Test/CiviTestListener.php:48
    0.1506   11022200  10. Civi\Test\CiviTestListener->cv() /home/jenkins/bknix-dfl/build/core-17734-4djw3/web/sites/all/modules/civicrm/Civi/Test/CiviTestListener.php:183

Found EXITCODES=" sequentialcreditnotes"

@seamuslee001
Copy link
Contributor

Jenkins re test this please

@colemanw
Copy link
Member

colemanw commented Jul 2, 2020

retest this please

@totten
Copy link
Member Author

totten commented Jul 3, 2020

Part of me thinks we should figure this out - part of me thinks that we should press forward on switching to civicrm-setup and then kill the installation canary completely.

@eileenmcnaughton
Copy link
Contributor

I suspect this one could reasonably return to the too-hard-basket for a bit...

@eileenmcnaughton
Copy link
Contributor

test this please

@eileenmcnaughton
Copy link
Contributor

If this fails again I think we should close & come back when there is momentum

@eileenmcnaughton
Copy link
Contributor

Still fails - I'm gonna close this - I feel like it was a moment of enthusiasm not something that will get love now it has become hard & is not on any critical path

@colemanw
Copy link
Member

Well I'm still feeling a little enthusiasm for this because the current hard-coded domain version in tests is going to get outdated quickly and eventually cause test failures because any newly added columns will be invisible to the api per #17729 (assuming that gets merged).

@seamuslee001
Copy link
Contributor

Jenkins re test this please

@colemanw
Copy link
Member

I think #17894 will work better.

@colemanw colemanw closed this Jul 19, 2020
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.

4 participants