DIRACGrid / DIRACGrid/diracx-charts

[Bug]: Discrepancy between default behavior of DB and Routers

Open
#280 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Shell
Stars
5
Forks
37
Avg merge
2d 20h
Merged PRs (30d)
4

Description

### Search before creating an issue

- [x] I have searched existing issues and confirmed this is not a duplicate

### Bug Description

By default, we enable routers.
By default, we only configure DBs if they are in the values.yaml

So when a new router is introduced (like RSS just now) the deployment fails because it tries enabling the service but can't find the DB.

That gives us 3 options:
* by default, we do not enable routers (the option I like the least)
* by default, we enable the DB (it can have side effect of creating DBs in the wrong DB instance, etc)
* When introducing a new service, we must not forget to add the db in the `values.yaml`. this was done properly for the `values.yaml.tpl`. It basically boils down to the 2nd option

### Steps to Reproduce

_No response_

### Expected Behavior

_No response_

### Actual Behavior

_No response_

### Environment

_No response_

### Relevant Log Output

```shell
Cannot wire cacheable source compute_status: ResourceStatusDB is not available
Cannot wire cacheable source fts_status: ResourceStatusDB is not available
Cannot wire cacheable source site_status: ResourceStatusDB is not available
Cannot wire cacheable source storage_status: ResourceStatusDB is not available

Traceback (most recent call last):
File "/app/.pixi/envs/container-services/bin/uvicorn", line 10, in
sys.exit(main())
^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/click/core.py", line 1524, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/click/core.py", line 1445, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/click/core.py", line 1308, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/click/core.py", line 877, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/uvicorn/main.py", line 441, in main
run(
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/uvicorn/main.py", line 620, in run
server.run()
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/uvicorn/server.py", line 75, in run
return asyncio_run(self.serve(sockets=sockets), loop_factory=self.config.get_loop_factory())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/uvicorn/_compat.py", line 30, in asyncio_run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/uvicorn/server.py", line 79, in serve
await self._serve(sockets)
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/uvicorn/server.py", line 86, in _serve
config.load()
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/uvicorn/config.py", line 484, in load
self.loaded_app = self.loaded_app()
^^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/diracx/routers/factory.py", line 419, in create_app
return create_app_inner(
^^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/container-services/lib/python3.11/site-packages/diracx/routers/factory.py", line 308, in create_app_inner
raise NotImplementedError(
NotImplementedError: Cannot enable system_name='rss' as it requires source_cls=
```

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Research direction

Compare values.yaml with values.yaml.tpl and trace how router defaults and database configuration are consumed when RSS is enabled. Reproduce the deployment failure and inspect the router factory and related chart templates; confirm the intended default with maintainers. Done means a new router such as RSS no longer fails because its required database configuration is absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
helm, yaml
Domain
devops, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.