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

Long duration (30 mins.) of e2e-localdb tests #6844

Closed
pvannierop opened this issue Nov 21, 2019 · 1 comment · Fixed by cBioPortal/cbioportal-frontend#2893
Closed

Long duration (30 mins.) of e2e-localdb tests #6844

pvannierop opened this issue Nov 21, 2019 · 1 comment · Fixed by cBioPortal/cbioportal-frontend#2893

Comments

@pvannierop
Copy link
Contributor

Since a few weeks end-2-end localdb tests take the double amount of time going from 15 to 30 minutes. The cause of this seems to be that the key generation used for caching the contents of the mysql database on CircleCI does not work as intended. It appears that every time a test runs a new key is derived from the data (study_es_0 and studies listed in dir end-to-end-tests/local/study). The finger print is created with the db_content_fingerprint.sh script.

MD5_ES_0=$(docker run --rm $BACKEND_IMAGE_NAME sh -c 'find /cbioportal/core/src/test/scripts/test_data/study_es_0/ -type f -exec md5sum {} \; | md5sum | sed "s/\s.*$//"')
MD5_TEST_STUDIES=$(find $TEST_HOME/local/studies/ -type f -exec md5sum {} \; | md5sum | sed "s/\s.*$//")
MD5_MIGRATION_SQL=$(docker run --rm $BACKEND_IMAGE_NAME sh -c 'md5sum /cbioportal/db-scripts/src/main/resources/migration.sql | sed "s/\s.*$//"')

# this is the string that is used to derive the md5sum key
echo "$MD5_ES_0 $MD5_TEST_STUDIES $MD5_MIGRATION_SQL $DB_CGDS_URL $DB_SEED_URL"

Apparently, any of these vars is different at each run of e2e-localdb. This can be seen in the logs of CircleCI for e2e-localdb tests in sections Generate checksum of data that populates the test database and Restoring cache:

No cache is found for key: v4-e2e-database-files-P0Z6qxaXeUAwMq1a1iFDUFUkt3iKj2P0ubXV1ecWQE0=
No cache is found for key: v4-e2e-database-files-S6QX64Qf+MIYffDDHN_CXD5gIB4fEyyi0cBHM60WeBo

.etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants