Skip to content

Database credential configuration naming inconsistency between YAML and object properties #1232

@coderabbitai

Description

@coderabbitai

Problem Description

There is a naming inconsistency in the database credential configuration:

  • The YAML configuration file uses the key database.user
  • The Database object property is named username

This mismatch can be confusing for users and developers working with the configuration system.

Current Behavior

In load_credentials_from_file, the code reads:

  • database.user from YAML → maps to self.username
  • database.password from YAML → maps to self.password

Proposed Solutions

As discussed by @haiqi96, we could:

  1. Change the YAML format: Update the configuration file format to use database.username instead of database.user for consistency with the object property names
  2. Backward compatibility: Provide users with a patch file or migration tool to convert existing configurations that use user to username
  3. Alternative: Support both keys during a transition period (accept either database.user or database.username)

Compatibility Concerns

  • Existing user configurations currently use database.user
  • Any change needs to consider backward compatibility
  • Migration tooling may be necessary to help users update their configurations

Context

This issue was identified during code review of PR #1152 where database credential loading was refactored.

References:

Contributors: @junhaoliao @haiqi96

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions