Bug
There is a mismatch between the key names defined in credentials.template.yml and the corresponding Pydantic config objects:
|
## Database credentials |
|
#database: |
|
# user: "user" |
|
# password: "pass" |
|
# |
|
## Queue credentials |
|
#queue: |
|
# user: "user" |
|
# password: "pass" |
|
# |
|
## Redis credentials |
|
#redis: |
|
# password: "pass" |
vs
the database credentials loading for example:
|
self.username = get_config_value(config, f"{DB_COMPONENT_NAME}.user") |
|
self.password = get_config_value(config, f"{DB_COMPONENT_NAME}.password") |
Additionally:
- The commented-out default values in
credentials.template.yml do not match the generated values when the credentials.yml file is missing:
|
credentials = { |
|
DB_COMPONENT_NAME: {"user": "clp-user", "password": secrets.token_urlsafe(8)}, |
|
QUEUE_COMPONENT_NAME: {"user": "clp-user", "password": secrets.token_urlsafe(8)}, |
|
REDIS_COMPONENT_NAME: {"password": secrets.token_urlsafe(16)}, |
|
} |
|
|
If the credentials loading mechanism is changed, can cause confusion for developers trying to populate credentials.yml correctly and may lead to runtime errors if the keys are misaligned.
CLP version
dfb4526
Environment
N/A: code issue
Reproduction steps
N/A: code issue
Bug
There is a mismatch between the key names defined in credentials.template.yml and the corresponding Pydantic config objects:
clp/components/package-template/src/etc/credentials.template.yml
Lines 1 to 13 in dfb4526
vs
the database credentials loading for example:
clp/components/clp-py-utils/clp_py_utils/clp_config.py
Lines 235 to 236 in dfb4526
Additionally:
credentials.template.ymldo not match the generated values when thecredentials.ymlfile is missing:clp/components/clp-package-utils/clp_package_utils/general.py
Lines 455 to 460 in dfb4526
If the credentials loading mechanism is changed, can cause confusion for developers trying to populate credentials.yml correctly and may lead to runtime errors if the keys are misaligned.
CLP version
dfb4526
Environment
N/A: code issue
Reproduction steps
N/A: code issue