Skip to content

[master] Add proxy class for BookkeepingDB

Chris Burr requested to merge cburr/LHCbDIRAC:bookkeeping-proxy into master

As was discussed a while ago, this MR renames the OracleBookkeepingDB class to LegacyOracleBookkeepingDB and makes a new OracleBookkeepingDB class. The actual diff in the commits is smaller however git struggles to understand the rename when looking at the MR diff. The new class redirects all method access to either LegacyOracleBookkeepingDB or NewOracleBookkeepingDB and can optionally log the results of methods calls. This functionality is controlled with environment variables and opens the way to refactoring the queries into something cleaner.

With the creation of this I think we should stop touching LegacyOracleBookkeepingDB for anything except critical bug fixes.

I also add a new CI job, bookkeeping_tests which runs unit tests against a real oracle database. This will allow us to add unit tests to the new methods and eventually end up with a database class with full test coverage.

For now the new class only implements getAvailableFileTypes however I'll have a follow up PR with a few more methods once this is accepted.

BEGINRELEASENOTES

*Bookkeeping NEW: Support two implementations of the bookkeeping DB

ENDRELEASENOTES

Merge request reports

Loading