Skip to content

Conversation

@twk3
Copy link
Contributor

@twk3 twk3 commented Jan 26, 2026

Should help fix auto line wrapping issues introduced by editors.

The check-env file will try to find that the problem has occured with the mongodb_URI


Summary by cubic

Adds a corruption check for MONGODB_URI in .env to catch line-wrapping issues and guide fixes, preventing broken on‑prem installs. Also adds a warning in .env.example about editing long lines (use nano -w).

  • New Features
    • Validates MONGODB_URI for spaces or missing mongodb:// and @.
    • Detects orphan fragments (authSource, replicaSet, mongodb:, 27017).
    • Fails with clear fix steps and suggests copying from .env.example.

Written for commit ff81cbc. Summary will update on new commits.

@twk3 twk3 requested a review from agoldis January 26, 2026 19:06
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="on-prem/scripts/check-env.sh">

<violation number="1" location="on-prem/scripts/check-env.sh:73">
P2: The corruption check only accepts `mongodb://`, so valid `mongodb+srv://` connection strings will be flagged as incomplete and cause a false failure. Expand the scheme check to allow the SRV format.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

twk3 and others added 2 commits January 26, 2026 11:41
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@agoldis agoldis merged commit f50c27d into main Jan 26, 2026
1 check passed
@agoldis agoldis deleted the feat/detect-env-line-wrap branch January 26, 2026 20:03
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.

3 participants