Skip to content

refactor: Improve working with env variables#10589

Open
ovr wants to merge 1 commit intomasterfrom
refactor/env-helpers
Open

refactor: Improve working with env variables#10589
ovr wants to merge 1 commit intomasterfrom
refactor/env-helpers

Conversation

@ovr
Copy link
Copy Markdown
Member

@ovr ovr commented Mar 31, 2026

No description provided.

…elpers

Replace standalone helper functions (asPortOrSocket, asFalseOrPort, asBoolOrTime)
and manual convertTimeStrToSeconds/convertSizeToBytes calls with env-var's built-in
extraAccessors API via `from(process.env, { ... })`, enabling clean chaining like
`env.get('KEY').default('5s').asTimeInSeconds()`.
@ovr ovr requested a review from a team as a code owner March 31, 2026 20:33
@github-actions github-actions bot added the javascript Pull requests that update Javascript code label Mar 31, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 25.00000% with 96 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.89%. Comparing base (515eeae) to head (837356b).

Files with missing lines Patch % Lines
packages/cubejs-backend-shared/src/env.ts 25.00% 95 Missing and 1 partial ⚠️

❗ There is a different number of reports uploaded between BASE (515eeae) and HEAD (837356b). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (515eeae) HEAD (837356b)
cubesql 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #10589       +/-   ##
===========================================
- Coverage   78.58%   57.89%   -20.70%     
===========================================
  Files         475      225      -250     
  Lines       92822    17570    -75252     
  Branches     3612     3607        -5     
===========================================
- Hits        72945    10172    -62773     
+ Misses      19333     6854    -12479     
  Partials      544      544               
Flag Coverage Δ
cube-backend 57.89% <25.00%> (+<0.01%) ⬆️
cubesql ?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant