Skip to content

[Analyze-1437] Remove cachedb and direct duckdb connection#1699

Merged
brandantck merged 13 commits intodevelopfrom
brandantck/analyze-1437_remove_cachedb_and_direct_duckdb_connection
Feb 5, 2026
Merged

[Analyze-1437] Remove cachedb and direct duckdb connection#1699
brandantck merged 13 commits intodevelopfrom
brandantck/analyze-1437_remove_cachedb_and_direct_duckdb_connection

Conversation

@brandantck
Copy link
Copy Markdown
Collaborator

Merge Checklist

Please cross check this list if additions / modifications needs to be done on top of your core changes and tick them off. Reviewer can as well glance through and help the developer if something is missed out.

  • Automated Tests (Jasmine integration tests, Unit tests, and/or Performance tests)
  • Updated Manual tests / Demo Config
  • Documentation (Application guide, Admin guide, Markdown, Readme and/or Wiki)
  • Verified that local development environment is working with latest changes (integrated with latest develop branch)
  • following best practices in code review doc

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes deprecated CacheDB integration and direct DuckDB connection paths, consolidating services onto TREX-based connectivity and cleaning up related configuration, docs, and test scaffolding.

Changes:

  • Removed CacheDB/DuckDB connection implementations and related shared utilities/exports.
  • Updated terminology-svc and analytics-svc to drop CacheDB/DuckDB-specific flags and code paths.
  • Cleaned up CI/test scripts, docker-compose, and documentation references tied to CacheDB/DuckDB.

Reviewed changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/backend_integration_tests/http-tests-local.sh Drops DuckDB/CacheDB env toggles and volume rewrite for local HTTP test setup.
internal/docs/env-vars.yml Removes USE_CACHEDB/USE_DUCKDB-related documented env vars.
functions/white-rabbit/deno.json Removes cachedb shared-import mappings; minor formatting.
functions/terminology-svc/src/services/hana-hdb-dao.ts Updates error/message and comments to remove cachedb wording.
functions/terminology-svc/src/services/cachedb.ts Refactors service API to stop threading datasetId into each call; removes cachedb-hana DAO usage.
functions/terminology-svc/src/services/cachedb-hana-dao.ts Deletes cachedb-backed HANA DAO implementation.
functions/terminology-svc/src/services/cachedb-dao.ts Removes cachedb/duckdb connection switching; uses TREX connection wrapper.
functions/terminology-svc/src/env.ts Removes CacheDB host/port env requirements.
functions/terminology-svc/src/controllers/conceptSet.ts Updates controller calls to new CachedbService method signatures (no datasetId per call).
functions/terminology-svc/src/controllers/concept.ts Updates controller calls to new CachedbService method signatures (no datasetId per call).
functions/terminology-svc/deno.json Removes cachedb env from trial task.
functions/query-gen-svc/deno.json Removes cachedb shared-import mappings.
functions/package.json Removes cachedb/duckdb env settings from functions env config.
functions/mri-pa-config/deno.json Removes cachedb shared-import mappings.
functions/mcp-server/src/env.ts Removes CacheDB host/port env requirements.
functions/d2e-webapi/src/env.ts Removes CacheDB host/port env requirements.
functions/d2e-webapi/src/dao/trex.dao.ts Updates comments referencing cachedb limitations to trex-sql.
functions/d2e-webapi/deno.json Removes cachedb env from dev task.
functions/concept-mapping/src/env.ts Removes CacheDB host/port env requirements.
functions/cdw-svc/spec/testutils/testenv/MockConnection.ts Removes now-nonexistent native-db communication methods from mock interface.
functions/cdw-svc/spec/testutils/connection.ts Removes DuckDB connection path from test helper.
functions/cdw-svc/deno.json Removes cachedb shared-import mappings.
functions/bookmark-svc/deno.json Removes cachedb shared-import mappings.
functions/analytics-svc/src/utils/cachedb/cachedb.ts Deletes cachedb connection utility.
functions/analytics-svc/src/utils/DuckdbConnection.ts Deletes direct DuckDB connection implementation.
functions/analytics-svc/src/mri/endpoint/CreatePluginEndpoint.ts Removes DuckDB native-db attach logic.
functions/analytics-svc/src/main.ts Removes cachedb/duckdb branching; simplifies DB connection routing to TREX/DBConnectionUtil.
functions/analytics-svc/src/env.ts Removes USE_DUCKDB/USE_CACHEDB and cachedb host/port env requirements.
functions/analytics-svc/src/api/controllers/patient.ts Removes DuckDB native-db detach logic; minor cleanup.
functions/analytics-svc/src/api/controllers/dataCharacterization.ts Removes cachedb schema resolution; simplifies DC connection selection.
functions/analytics-svc/src/api/controllers/cohort.ts Removes cachedb/duckdb-specific cohort connection logic; makes helper sync.
functions/analytics-svc/deno.json Removes cachedb/duckdb imports mappings.
functions/analytics-svc/README.md Removes documentation about USE_DUCKDB toggle.
functions/analytics-svc/Dockerfile Removes creation of duckdb_data directory.
functions/alp-dataflow-gen-init/src/env.ts Removes cachedb host/port from env mapping.
functions/_shared/alp-base-utils/src/utils.ts Removes cachedb database-format helpers and CachedbConnectionType enum.
functions/_shared/alp-base-utils/src/index.ts Removes cachedb utility exports from shared package surface.
functions/_shared/alp-base-utils/src/helpers/hanaTranslation.ts Removes cachedb-specific placeholder rewrites.
functions/_shared/alp-base-utils/src/cachedb/CachedbNodeHDBConnection.ts Deletes cachedb HANA-over-PG connection implementation.
functions/_shared/alp-base-utils/src/cachedb/CachedbDBConnectionUtil.ts Deletes cachedb DBConnectionUtil implementation.
functions/_shared/alp-base-utils/src/Connection.ts Removes cachedb/duckdb native-db communication methods from ConnectionInterface.
fhir_functions/_shared/alp-base-utils/src/utils.ts Mirrors removal of cachedb helpers in FHIR shared utils.
fhir_functions/_shared/alp-base-utils/src/index.ts Mirrors removal of cachedb exports in FHIR shared package surface.
fhir_functions/_shared/alp-base-utils/src/helpers/hanaTranslation.ts Mirrors removal of cachedb-specific placeholder rewrites in FHIR translation helper.
fhir_functions/_shared/alp-base-utils/src/cachedb/CachedbNodeHDBConnection.ts Deletes cachedb connection implementation in FHIR shared utils.
fhir_functions/_shared/alp-base-utils/src/cachedb/CachedbDBConnectionUtil.ts Deletes cachedb DBConnectionUtil in FHIR shared utils.
fhir_functions/_shared/alp-base-utils/src/Connection.ts Removes cachedb/duckdb native-db communication methods from FHIR ConnectionInterface.
docker-compose.yml Removes cachedb volume definition.
README.md Updates CI badge table rows to remove cachedb workflow badge.
.vscode/launch.json Removes cachedb debug attach configuration.
.github/workflows/functions-http-tests.yml Removes USE_DUCKDB/USE_CACHEDB env setup and cachedb-related comments.
.github/CODEOWNERS.src Removes cachedb service ownership entry.
.github/CODEOWNERS Removes cachedb service ownership entry.
Comments suppressed due to low confidence (2)

functions/concept-mapping/src/env.ts:15

  • This env schema no longer includes CACHEDB__HOST/CACHEDB__PORT, but the concept-mapping DAO still references env.CACHEDB__HOST and env.CACHEDB__PORT (and cachedb protocol helpers). With these removals, deno check/type-checking will fail and runtime config will be missing. Either update/remove the concept-mapping cachedb DAO usage, or keep these env vars until the service is migrated off cachedb.
    functions/cdw-svc/spec/testutils/connection.ts:30
  • createConnection still accepts dialect: "duckdb" | "hana", but credentialsMap only defines hana. Callers in this test suite invoke createConnection("duckdb"), which will now pass undefined credentials into getDbClient and fail at runtime. Either remove the "duckdb" option and update the call sites, or implement the intended duckdb/trex test connection path.

Comment thread functions/terminology-svc/src/env.ts
Comment thread functions/_shared/alp-base-utils/src/utils.ts
@brandantck brandantck added this pull request to the merge queue Feb 5, 2026
Merged via the queue into develop with commit 02113a2 Feb 5, 2026
54 of 55 checks passed
@brandantck brandantck deleted the brandantck/analyze-1437_remove_cachedb_and_direct_duckdb_connection branch February 5, 2026 08:31
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.

Remove cachedb connection and direct duckdb connection code from codebase

7 participants