Skip to content

refactor(backend-shared): fix getEnv return type inference#10598

Open
ovr wants to merge 7 commits intomasterfrom
chore/env-fix-ts
Open

refactor(backend-shared): fix getEnv return type inference#10598
ovr wants to merge 7 commits intomasterfrom
chore/env-fix-ts

Conversation

@ovr
Copy link
Copy Markdown
Member

@ovr ovr commented Apr 1, 2026

Remove explicit Record<string, (...args: any) => any> annotation from variables and use satisfies to preserve inferred types. Change getEnv to use rest parameters so ReturnType<Vars[T]> resolves to actual types (boolean, string, number, etc.) instead of any.

Remove explicit `Record<string, (...args: any) => any>` annotation from
`variables` and use `satisfies` to preserve inferred types. Change
`getEnv` to use rest parameters so `ReturnType<Vars[T]>` resolves to
actual types (boolean, string, number, etc.) instead of `any`.
@ovr ovr requested review from a team as code owners April 1, 2026 10:08
@github-actions github-actions bot added driver:mssql Issues relating to the MSSQL driver javascript Pull requests that update Javascript code driver:firebolt data source driver labels Apr 1, 2026
@github-actions github-actions bot added driver:redshift Issues relating to the Redshift driver driver:bigquery Issues related to the BigQuery driver driver:snowflake Issues relating to the Snowflake driver driver:clickhouse Issues related to the ClickHouse driver driver:athena Issues related to the AWS Athena driver driver:prestodb Issues relating to the PrestoDB driver driver:postgres Issues relating to the Postgres driver driver:databricks driver:duckdb driver:pinot cubejs-jdbc-driver labels Apr 1, 2026
@ovr ovr force-pushed the chore/env-fix-ts branch from db3eac2 to ad730a2 Compare April 1, 2026 15:32
@ovr ovr force-pushed the chore/env-fix-ts branch from ad730a2 to e1ed03e Compare April 1, 2026 15:34
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

❌ Patch coverage is 38.63636% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.85%. Comparing base (1e37d1f) to head (ab68220).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
packages/cubejs-backend-shared/src/env.ts 17.39% 19 Missing ⚠️
...s/cubejs-clickhouse-driver/src/ClickHouseDriver.ts 50.00% 3 Missing ⚠️
...ackages/cubejs-prestodb-driver/src/PrestoDriver.ts 40.00% 1 Missing and 2 partials ⚠️
...kages/cubejs-bigquery-driver/src/BigQueryDriver.ts 50.00% 0 Missing and 1 partial ⚠️
...orchestrator/src/orchestrator/QueryOrchestrator.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10598      +/-   ##
==========================================
- Coverage   57.89%   57.85%   -0.05%     
==========================================
  Files         225      225              
  Lines       17587    17608      +21     
  Branches     3614     3621       +7     
==========================================
+ Hits        10182    10187       +5     
- Misses       6861     6877      +16     
  Partials      544      544              
Flag Coverage Δ
cube-backend 57.85% <38.63%> (-0.05%) ⬇️

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.

@ovr ovr force-pushed the chore/env-fix-ts branch from 4873bad to ab68220 Compare April 1, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cubejs-jdbc-driver data source driver driver:athena Issues related to the AWS Athena driver driver:bigquery Issues related to the BigQuery driver driver:clickhouse Issues related to the ClickHouse driver driver:databricks driver:duckdb driver:firebolt driver:mssql Issues relating to the MSSQL driver driver:pinot driver:postgres Issues relating to the Postgres driver driver:prestodb Issues relating to the PrestoDB driver driver:redshift Issues relating to the Redshift driver driver:snowflake Issues relating to the Snowflake driver javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants