Skip to content

[v9.0] test (CI): give diracx-init-db a URL for every DiracX DB - #8828

Open
aldbr wants to merge 3 commits into
DIRACGrid:rel-v9r0from
aldbr:ci/v9r0-diracx-all-db-urls
Open

aldbr wants to merge 3 commits into
DIRACGrid:rel-v9r0from
aldbr:ci/v9r0-diracx-all-db-urls

Conversation

@aldbr

@aldbr aldbr commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

DiracX is about to require a URL for every registered DB entry point, instead of silently skipping the ones that are not set (DIRACGrid/diracx#1034, following DIRACGrid/diracx-charts#280).

In the integration setup, diracx-init-db only sets DIRACX_DB_URL_AUTHDB. With the stricter DiracX, python -m diracx.db init-sql fails with TaskDB found but no URL connection set, so the diracx container never starts.

Changes to tests/CI/docker-compose.yml:

  • create a DiracXTaskDB database and set DIRACX_DB_URL_TASKDB on diracx-init-db and diracx
  • on diracx-init-db, point the DBs shared with DIRAC to sqlite+aiosqlite:///:memory:: this satisfies the URL check without DiracX creating tables in DIRAC's databases (DIRAC creates e.g. the TaskQueueDB tables itself, at service start)
  • drop init-os from diracx-init-db, it had nothing to initialise before either

This also works with the current DiracX, so it can be merged before DIRACGrid/diracx#1034. Same change as #8827 (integration).

BEGINRELEASENOTES
*tests
CHANGE: diracx-init-db sets a URL for every DiracX DB, initialising only the DiracX-owned ones in MySQL
ENDRELEASENOTES

🤖 Generated with Claude Code

DiracX is about to require a URL for every registered DB entry point
(DIRACGrid/diracx#1034) instead of silently skipping the unset ones.
diracx-init-db only set the AuthDB URL, so init-sql/init-os would fail
on TaskDB, JobDB, ... and the diracx service would never start.

- create DiracXTaskDB and set DIRACX_DB_URL_TASKDB on init-db and diracx
- set the DIRAC-shared SQL DB URLs and the JobParametersDB OS URL on init-db
- start init-db after diracx-wait-for-db (DIRAC creates the shared DBs)
  and once opensearch is healthy

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 54b265e)
aldbr and others added 2 commits October 15, 2026 12:31
Running init-sql against the DBs shared with DIRAC created DiracX tables
before DIRAC did: TaskQueueDB.sql has no tables, so tq_TaskQueues was
created by DiracX (signed TQId) and DIRAC then failed to add
tq_RAM_requirements (unsigned foreign key, MySQL error 3780).

Only initialise the DiracX-owned DBs (AuthDB, TaskDB) in MySQL, point the
shared ones to in-memory SQLite to satisfy DiracX's URL check, drop
init-os and restore the original start order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit abdde92)
A value ending with a colon is parsed by YAML as a mapping, which docker
compose rejects (environment.[2]: unexpected type map).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 9749ca6)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant