Skip to content

Rename environments variables#861

Merged
josecelano merged 2 commits intotorrust:developfrom
josecelano:851-config-overhaul-change-env-var-names-convention
May 14, 2024
Merged

Rename environments variables#861
josecelano merged 2 commits intotorrust:developfrom
josecelano:851-config-overhaul-change-env-var-names-convention

Conversation

@josecelano
Copy link
Copy Markdown
Member

TORRUST_TRACKER_BACK_           -> TORRUST_TRACKER_

TORRUST_TRACKER_DATABASE_DRIVER -> TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER
TORRUST_TRACKER_API_ADMIN_TOKEN -> TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN

TORRUST_TRACKER_CONFIG          -> TORRUST_TRACKER_CONFIG_TOML
TORRUST_TRACKER_PATH_CONFIG     -> TORRUST_TRACKER_CONFIG_TOML_PATH

DB_DRIVER values: MySQL, Sqlite3. Removed lowercase values mysql and sqlite3 used in containers. Some enums use lowercase. This is a breaking change for containers but not for configuration. In the future, we could use lowercase also in the configuration.

@josecelano josecelano linked an issue May 14, 2024 that may be closed by this pull request
@josecelano josecelano self-assigned this May 14, 2024
```
TORRUST_TRACKER_BACK_           -> TORRUST_TRACKER_

TORRUST_TRACKER_DATABASE_DRIVER -> TORRUST_TRACKER_CONFIG_OVERRIDE_DB_DRIVER
TORRUST_TRACKER_API_ADMIN_TOKEN -> TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN

TORRUST_TRACKER_CONFIG          -> TORRUST_TRACKER_CONFIG_TOML
TORRUST_TRACKER_PATH_CONFIG     -> TORRUST_TRACKER_CONFIG_TOML_PATH
```

DB_DRIVER values: `MySQL`, `Sqlite3`. Removed lowercase values `mysql`
and `sqlite3` used in containers. Some enums use lowercase. This is a
braking change for container but not for configuration. IN the future we
could use lowercase also in the configuration.
@josecelano josecelano force-pushed the 851-config-overhaul-change-env-var-names-convention branch from 88d1912 to ef15e0b Compare May 14, 2024 12:58
@codecov
Copy link
Copy Markdown

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 78.74%. Comparing base (7938433) to head (a4d2adf).

Files Patch % Lines
src/console/ci/e2e/runner.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #861      +/-   ##
===========================================
- Coverage    78.82%   78.74%   -0.08%     
===========================================
  Files          169      169              
  Lines         9325     9300      -25     
===========================================
- Hits          7350     7323      -27     
- Misses        1975     1977       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The env var `TORRUST_TRACKER_API_ADMIN_TOKEN` was replaced with `TORRUST_TRACKER_CONFIG_OVERRIDE_HTTP_API__ACCESS_TOKENS__ADMIN`.

After the migration to Figment all configuration options can be
overwritten.
@josecelano josecelano marked this pull request as ready for review May 14, 2024 14:29
@josecelano
Copy link
Copy Markdown
Member Author

ACK a4d2adf

@josecelano josecelano merged commit 1ed2c74 into torrust:develop May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Config overhaul: change env var names convention

1 participant