Skip to content

Fix bug in Mega Components with DB URL - #111

Open
rkeene wants to merge 1 commit into
mainfrom
bug/megacomponents-db-url-wrong
Open

rkeene wants to merge 1 commit into
mainfrom
bug/megacomponents-db-url-wrong

Conversation

@rkeene

@rkeene rkeene commented Aug 24, 2026

Copy link
Copy Markdown
Member

This change fixes a bug where addSubjectAlternativeToHosts cannot work with a URL generated and stored in MC_PSQL_DB_URL because it passes the protocol to openssl s_client ... -starttls <protocol> and postgres is a valid STARTTLS protocol option while postgresql is not.


Note

Low Risk
Single scheme string in Pulumi env output; behavior change is limited to URL parsing for STARTTLS and standard drivers accept postgres://.

Overview

Summary

Mega Components host SAN automation (addSubjectAlternativeToHosts) reads the URL scheme and passes it to openssl s_client -starttls. URLs built as postgresql:// produced an invalid STARTTLS protocol; postgres:// matches what OpenSSL expects so TLS cert discovery and /etc/hosts updates work for database connections.

Related Issues

None

Changes Made

  • MC_PSQL_DB_URL from buildDatabaseEnvVars uses the postgres:// scheme instead of postgresql:// (same host, credentials, port, and sslmode=require)

Testing

None

Breaking Changes

None (both schemes are widely accepted PostgreSQL connection URLs; only consumers that required the literal postgresql prefix would differ)

Reviewed by Cursor Bugbot for commit 9d33186. Configure here.

@rkeene
rkeene requested a review from sephynox August 24, 2026 17:11
@rkeene rkeene self-assigned this Aug 24, 2026
@rkeene rkeene added the bug Something isn't working label Aug 24, 2026
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants