Skip to content

fix: stablized env defaults, removed MongoDB wiring#196

Open
devcodesfr wants to merge 30 commits into
devfrom
devin_gamble-dev
Open

fix: stablized env defaults, removed MongoDB wiring#196
devcodesfr wants to merge 30 commits into
devfrom
devin_gamble-dev

Conversation

@devcodesfr
Copy link
Copy Markdown
Contributor

@devcodesfr devcodesfr commented Apr 25, 2026

Description

Adds runtime environment defaults for local QA/dev setup and removes unused MongoDB wiring from the platform.

This PR ensures required environment values have safe local fallbacks where they are accessed at runtime, while also removing MongoDB-related configuration, dependencies, scripts, and references now that MongoDB is no longer used.

  • Related Issue number: N/A
  • Plaky feature name: N/A
  • Component/system affected: QA team environment, Docker Compose, backend service Dockerfiles, external bridge/auth configuration
  • Purpose: fix / improvement

Changes

  • Added runtime fallback defaults for required local environment values: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, EXTERNAL_BRIDGE_BASE_URL, AUTH_SERVICE_URL
  • Standardized local Docker service URLs to use service hostnames where appropriate:
    http://auth-service:5001
    http://external-bridge-service:5006
  • Removed MongoDB wiring and references from source, config, scripts, docs, and environment examples
  • Preserved non-MongoDB functionality and avoided replacing MongoDB with new architecture in this PR

Testing

  • Verified MongoDB references were removed from source/docs/config/runtime files
  • Continued Docker QA environment validation after resolving build/auth blockers

Important Notes (Optional)


Workflow Checklist

  • Branch is up to date with dev
  • PR is from your branch → dev (no longer directly into main)
  • PR title follows convention (feat:, fix:, refactor:, etc.)
  • Plaky feature/bug name included above
  • Plaky task moved to "Needs QA"

Review Requests

@jrb00013

- added required env variables and defaults
- fixed Docker build issues and missing contexts
- implemented runtime fallbacks for process.env
- resolved service networking (auth-service, external-bridge)
- verified QA services build and run locally
@jrb00013
Copy link
Copy Markdown
Member

@devcodesfr we need this code in production branch please bro

@devcodesfr
Copy link
Copy Markdown
Contributor Author

devcodesfr commented May 1, 2026

@jrb00013
I attempted to manage conflicts but it included too many changes in my Dockerfiles. so I decided to make a new branch and reapply the changes included with the .env file.

I proceeded with testing by rebuilding (./build.sh) but a good bit of services failed ("❌ Failed services: api-gateway auth-service workflow-orchestrator incentive-engine decision-intelligence communications-hub external-bridge-service adaptive-experience-engine realtime-gateway language-intelligence-service messaging-service synapse frontend-dev adminer"). I investigated these services by trying to build them individually, but I ran into a GCHR issue with 401 Unauthorized and 403 Forbidden errors (failed to solve: ghcr.io/team-deepiri/deepiri-base:18-slim: failed to resolve source metadata for ghcr.io/team-deepiri/deepiri-base:18-slim: unexpected status from HEAD request to https://ghcr.io/v2/team-deepiri/deepiri-base/manifests/18-slim: 403 Forbidden). (I passed the 401 Unauthorized error by logging in to GH auth, but it still pushed the 403 error when rebuilding failed services individually.)

it seems that Docker is failing at pulling the base image from team-deepiri/deepiri-base, and I don't have authorized access. so for now, I'm going to make a new PR with just the updated .env.example file and platform-services files needed with the updated parameters. any next steps you advise?

@jrb00013
Copy link
Copy Markdown
Member

jrb00013 commented May 1, 2026

@devcodesfr how is this now? is this good sir?

npm install --legacy-peer-deps && \
npm cache clean --force && \
echo "@team-deepiri:registry=https://npm.pkg.github.com" > .npmrc
rm -f package-lock.json && npm install --legacy-peer-deps /shared-utils.tgz && \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why are we removing the package lock json here?

&& npm install --legacy-peer-deps \
&& npm cache clean --force \
&& echo "@team-deepiri:registry=https://npm.pkg.github.com" > .npmrc
&& rm -f package-lock.json && npm install --legacy-peer-deps \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same with all of these?

Comment thread .env.example
GOOGLE_CLIENT_SECRET=your-google-client-secret
EXTERNAL_BRIDGE_BASE_URL=http://localhost:5006
AUTH_SERVICE_URL=http://auth-service:5001

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This has just created them in env. example, we actually need default values in the os.env as needed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@devcodesfr we need to fix this up asap

@jrb00013
Copy link
Copy Markdown
Member

jrb00013 commented May 1, 2026

@devcodesfr

@devcodesfr
Copy link
Copy Markdown
Contributor Author

devcodesfr commented May 1, 2026

@jrb00013
made the requested changes. let me know if there are further issues you'd like for me to investigate

note: I switched Dockerfile installs from npm install to npm ci so builds use the committed lockfile and remain reproducible. kept --legacy-peer-deps where it already existed to preserve current dependency resolution behavior.

@jrb00013
Copy link
Copy Markdown
Member

jrb00013 commented May 2, 2026

@runbinz please review this

@jrb00013
Copy link
Copy Markdown
Member

jrb00013 commented May 4, 2026

@runbinz @Team-Deepiri/support-team @austinm2h35-sketch @asheenhameeda8-cpu

@jrb00013
Copy link
Copy Markdown
Member

jrb00013 commented May 4, 2026

@devcodesfr there was maybe some leftover mongodb artifacts your AI read in the core-api which made it think mongodb was needed.

Is this all good now? Whats the progress of this PR and #207

@devcodesfr
Copy link
Copy Markdown
Contributor Author

devcodesfr commented May 4, 2026

@jrb00013
both PRs are pretty much working on the same thing now, but I was able to remove all MongoDB references and wiring. although I can't confirm functionality just yet because I'm running into some build issues in the QA team dev environment. I keep running into a 403 Forbidden error with that deepiri-base/deepiri-suite package because it seems my token doesn't have access to it. I contacted Sean San about it so he can give me some further assistance with it.

@jrb00013
Copy link
Copy Markdown
Member

jrb00013 commented May 4, 2026

@devcodesfr did you update to deepiri suite?

@jrb00013
Copy link
Copy Markdown
Member

jrb00013 commented May 4, 2026

Why are you using a token to access it? What token? We told you to setup ssh for git credentials

@jrb00013
Copy link
Copy Markdown
Member

jrb00013 commented May 4, 2026

@Team-Deepiri/support-team can someone test his code on here

@jrb00013
Copy link
Copy Markdown
Member

jrb00013 commented May 4, 2026

This needs to be assigned someone to test the build and services to make sure they're healthy

@Team-Deepiri/support-team

Comment thread platform-services/shared/deepiri-synapse/app/main.py Fixed
Comment thread platform-services/shared/deepiri-synapse/app/main.py Fixed
Comment thread platform-services/shared/deepiri-synapse/app/main.py Fixed
devcodesfr and others added 3 commits May 6, 2026 10:17
… through an exception'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
… through an exception'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
… through an exception'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@devcodesfr
Copy link
Copy Markdown
Contributor Author

I've successfully confirmed that all services still build and start healthily with the removal of MongoDB. I also fixed some backend build errors and changed Dockerfiles to use deepiri-suite packaging.

let me know if there are any other issues.

@asheenhameeda8-cpu
Copy link
Copy Markdown

@runbinz This is assigned to you as well. Test/Review it ASAP!!

@devcodesfr devcodesfr changed the title fix: added Google client variables and default values in runtime files fix: stablized env defaults, removed MongoDB wiring May 8, 2026
@jrb00013
Copy link
Copy Markdown
Member

@devcodesfr bro which one do we close this one or 207

@jrb00013
Copy link
Copy Markdown
Member

@austinm2h35-sketch keep track of his answer and close if needed

@devcodesfr
Copy link
Copy Markdown
Contributor Author

@jrb00013
close #207

@jrb00013
Copy link
Copy Markdown
Member

@Team-Deepiri/support-team now someone test this PR please to make sure no services break

@devcodesfr
Copy link
Copy Markdown
Contributor Author

@sergiovargas111 @runbinz

@sergiovargas111 sergiovargas111 requested review from sergiovargas111 and removed request for sergiovargas111 May 15, 2026 07:16
@sergiovargas111 sergiovargas111 self-assigned this May 15, 2026
@sergiovargas111
Copy link
Copy Markdown

❌ QA Rejected

Issue 1: MongoDB still present
Mongoose is still actively used across source code, runtime, tests, and dependencies on this branch. Confirmed by reviewing the codebase and finding references including active database connection logic and model definitions.

Reproduce: grep -r "mongoose|MONGODB_URI|MONGO_URI" ~/Deepiri/deepiri-platform/deepiri-core-api/src/

Expected: No MongoDB references found.

Issue 2: Docker QA build fails

When rebuilding, communications-hub fails with npm error Cannot read properties of undefined (reading 'extraneous') on the latest code. This occurs during npm ci --legacy-peer-deps in the shared-utils build step, causing the QA environment to fail to start.

Reproduce: team_dev_environments/qa-team/./build.sh

Expected: All services build successfully with exit code 0.

@jrb00013
Copy link
Copy Markdown
Member

jrb00013 commented May 15, 2026 via email

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.

7 participants