Skip to content

Config overhaul: use an explicit section for metadata #958

@josecelano

Description

@josecelano

Parent issue: #401

After a discussion today, we decided to make the "namespace" in the configuration explicit by using the project name or package name. The main benefit is you can parse the file to know which service the configuration belongs to.

Current version

version = "2.0.0"

# ...

Proposal 1

[torrust_tracker]
version = "2.0.0"

# ...

Proposal 2

[project]
name = "torrust_tracker"
version = "2.0.0"

# ...

Hi @da2ce7, I came up with this solution after seeing this Python feature.

I think it's better to move the namespace value to an option value. The type in Rust would be the same for all Torrust projects.

Proposal 3

[metadata]
name = "torrust_tracker"
version = "2.0.0"

# ...

I also think that maybe version is too ambiguous if we use the "project" keyword because you don't know if it's the app version of the config file version because there is no native way to add metadata in TOMl files. In our case the config version does not match the app version.

Metadata

Metadata

Labels

Needs FeedbackWhat dose the Community Think?

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions