Open chrisjsewell opened 2 years ago
Just mentioning that there are many Github actions test setups in plugins that set the AIIDA_TEST_BACKEND
variable, either to django
or to sqlalchemy
.
That django
no longer works makes sense, but do we also need to raise when people use sqlalchemy
?
Perhaps we can continue allowing that? At the very least, the error message ValueError: Unknown backend 'sqlalchemy' read from AIIDA_TEST_BACKEND environment variable
should say what the allowed backends are.
psql_dos
is not very self-explanatory (even I don't know what dos
stands for)
Edit: ok, I get it now
even I don't know what dos stands for
psql_dos=postgresql+disk-objectstore, i.e. what the storage format actually is, not what python package happens to be used
I would just update the error message, to tell people to change to psql_dos. Presumably, people using AIIDA_TEST_BACKEND are doing it to test against both django and sqlachemy, so it's in their interest to know that they don't need to do this anymore, and they can basically drop the use of AIIDA_TEST_BACKEND
Some TODOs left over from #5330:
Profile.storage_cls
select the backend class via an entry_point (Done in #5501)Profile.set_storage
andProfile.set_process_controller
, use aclassmethod
on the backend class, to validate the configProfile.repository_path
should be moved onto the backend class (Done in #5516)repository_path
is now also used for sandbox folders, which is really a different conceptProfile.rmq_prefix
andProfile.get_rmq_url
should be moved to a separate "backend class for process control", similar toProfile.storage_cls
Config.delete_profile
contains logic very specific to thepsql_dos
, and so needs to be refactored (Done in https://github.com/aiidateam/aiida-core/pull/6224)verdi profile delete
verdi setup
I guess)verdi setup
there is no check that the database/repository URL you supply is initially empty, e.g. is not being used by another profileaiida/backends/sqlalchemy/alembic_cli.py::alembic_revision
currently fails, becausealembic.RevisionContext._run_environment
has issues with multiple heads (it works if you comment out the initial auto-generate check in that method)ArchiveReadOnlyBackend
, in light of the backend abstract improvementsProfile
with e.g. thestorage.backend = "archive"
and the config pointing to the archive path.tests/backends/aiida_sqlalchemy/test_utils.py
andtests/backends/aiida_sqlalchemy/migrations/conftest.py
aiida/restapi/common/utils.py::close_thread_connection
should eventually not be hard-coded to thepsql_dos
backendManager
, we could perhaps make this thread-localprofile_context
should probably restore any originally loaded profile, on exitOriginally posted by @chrisjsewell in https://github.com/aiidateam/aiida-core/issues/5330#issuecomment-1032894701