Skip to content

Custom prefix for MultiTestDB database names

Marek Szuba requested to merge feature/multitestdb_custom_prefix into master

Created by: mkszuba

Description

Set the prefix used by MultiTestDB to generate unique database names to the contents of the environment variable ENSEMBL_TESTDB_PREFIX if it exist, reverting to the old behaviour of using local user name if it does not.

Use case

Until now, MultiTestDB would prefix the names of test databases it creates with the local user name as determined by looking at the environment variables: LOGNAME and USER, in the order as written here. There are the following problems with this approach:

  • it leaks local user names to the database system and by extension to everyone who can access them,
  • in the event of said local user names being different from farm ones it makes it more difficult to identify to whom a specific database belongs.

Benefits

One now easily prevent the local user name from being leaked, and if the new environment variable is set to the user's login name on the EBI farm it will make it easier for whoever inspects the database server to determine to whom various databases belong.

Possible Drawbacks

None I can think of.

Testing

Have you added/modified unit tests to test the changes?

No.

If so, do the tests pass/fail?

N/A

Have you run the entire test suite and no regression was detected?

Have run the test suite for both ensembl-test and, just to see what would happen, ensembl. No regression detected.

Merge request reports