NASA-AMMOS / NASA-AMMOS/AIT-Core
Refactor config so that databaseImpl ('datastore') is under 'database' section
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 56
- Forks
- 35
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 3
Description
Currently, plugins that use the database declare the database impl (currently between Influx and MySql) as part of their plugin section in the AIT config. E.g.
plugins:
- plugin:
name: ait.core.server.plugins.openmct.AITOpenMctPlugin
inputs:
- telem_stream
service_port: 8082
debug_enabled: False
database_enabled: True
datastore: ait.core.db.InfluxDBBackend
...similar for the Data Archive Plugin.
However, once a DB instance is created, the plugin relies on the general 'database' section for database and access settings:
database:
host: localhost
port: 8086
dbname: ait
un: <username>
pw: <password>
Now that there are two plugins that rely on a database, it seems that the datastore itself should also be under the 'database' section (and if there are cases of intentionally needing two separate DB types, then that info should be included in the plugin section?)
So it would be:
database:
host: localhost
port: 8086
dbname: ait
un: <username>
pw: <password>
datastore/impl/etc: ait.core.db.InfluxDBBackend
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the AIT configuration parsing and the plugin references to datastore, including the Open MCT and Data Archive plugins, then trace how the shared database settings are consumed. Done means the datastore implementation is configured under database consistently and both database-using plugins still initialize correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100