Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Config #849

Merged
merged 40 commits into from
May 1, 2023
Merged

Better Config #849

merged 40 commits into from
May 1, 2023

Conversation

dyc3
Copy link
Owner

@dyc3 dyc3 commented Apr 11, 2023

closes #349

This PR overhauls how OTT is configured.

Notable changes

  • configs are now .toml files that live in env and they are the preferred way to configure OTT.
    • environment variables should still work
  • The POSTGRES_DB_* environment variables are deprecated, and support will be removed some time in the future
    • The new environment vars are more in line with postgres' docker container environment vars.

TODO:

  • deprecate old postgres environment vars and print a warning instead of just removing them
  • add redis to config schema
  • update docker compose files
  • remove dotenv
  • open a new issue about server-injected feature flags

test plan:

  • make sure db migrations still work
  • make sure environment vars override config values
  • test docker image
  • test heroku deployment on staging

@cypress
Copy link

cypress bot commented Apr 11, 2023

Passing run #157 ↗︎

0 52 1 0 Flakiness 0

Details:

Merge a6cd288 into 5b45da5...
Project: OpenTogetherTube Commit: 5a19acfc95 ℹ️
Status: Passed Duration: 03:16 💡
Started: May 1, 2023 2:44 PM Ended: May 1, 2023 2:47 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@dyc3 dyc3 temporarily deployed to ott-staging April 11, 2023 15:49 Inactive
@dyc3 dyc3 temporarily deployed to ott-staging April 11, 2023 15:59 Inactive
@dyc3 dyc3 temporarily deployed to ott-staging April 11, 2023 16:24 Inactive
@dyc3 dyc3 temporarily deployed to ott-staging April 11, 2023 20:30 Inactive
@dyc3 dyc3 temporarily deployed to ott-staging April 11, 2023 20:34 Inactive
@dyc3 dyc3 temporarily deployed to ott-staging April 11, 2023 21:58 Inactive
@dyc3 dyc3 temporarily deployed to ott-staging April 11, 2023 22:17 Inactive
@dyc3 dyc3 temporarily deployed to ott-staging April 12, 2023 00:16 Inactive
@dyc3 dyc3 temporarily deployed to ott-staging April 20, 2023 14:52 Inactive
@dyc3 dyc3 changed the title better config Better Config Apr 20, 2023
@dyc3 dyc3 temporarily deployed to ott-staging April 21, 2023 12:45 Inactive
@dyc3 dyc3 marked this pull request as ready for review April 21, 2023 13:21
server/ott-config.ts Dismissed Show dismissed Hide dismissed
@codecov
Copy link

codecov bot commented May 1, 2023

Codecov Report

Merging #849 (a6cd288) into master (a13f39b) will increase coverage by 0.0212%.
The diff coverage is 75.8333%.

@@               Coverage Diff                @@
##             master       #849        +/-   ##
================================================
+ Coverage   60.9984%   61.0196%   +0.0212%     
================================================
  Files            83         83                
  Lines          9515       9533        +18     
  Branches        948        925        -23     
================================================
+ Hits           5804       5817        +13     
- Misses         3711       3716         +5     
Impacted Files Coverage Δ
server/ott-config.ts 62.0689% <60.7142%> (+2.6486%) ⬆️
server/logger.js 31.8181% <66.6666%> (+3.9112%) ⬆️
server/app.ts 72.5663% <77.2727%> (+4.0979%) ⬆️
server/redisclient.ts 53.2608% <87.5000%> (+1.0869%) ⬆️
server/admin.ts 91.6666% <100.0000%> (+0.7575%) ⬆️
server/api.js 42.7631% <100.0000%> (ø)
server/ffprobe.ts 20.6896% <100.0000%> (-0.4968%) ⬇️
server/infoextractor.ts 63.9593% <100.0000%> (ø)
server/rate-limit.ts 68.4210% <100.0000%> (ø)
server/services/reddit.ts 80.7017% <100.0000%> (+0.3446%) ⬆️
... and 4 more

... and 2 files with indirect coverage changes

@dyc3 dyc3 merged commit f64986b into master May 1, 2023
12 of 14 checks passed
@dyc3 dyc3 deleted the better-config branch May 1, 2023 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Configuration should be more robust
1 participant