Skip to content

Conversation

@rfay
Copy link
Member

@rfay rfay commented Oct 23, 2025

The Issue

PLATFORM_RELATIONSHIPS caused two major problems:

  1. The upsun CLI detected it and behaved as if running in production, causing ddev pull upsun to fail with empty database dumps (ddev-upsun doesn't work with ddev pull upsun (no database) #13)
  2. PLATFORM_RELATIONSHIPS was incomplete, missing opensearch and memcached services (PLATFORM_RELATIONSHIPS does not not have all services in it #15)

Removed PLATFORM_RELATIONSHIPS entirely from generated environment variables because:

  • Applications don't actually need it - they use simpler env vars (MARIADB_HOST, DB_HOST, etc.)
  • The .environment file already maps service variables to application-expected variables
  • It confuses the upsun CLI into production mode
  • Building a complete PLATFORM_RELATIONSHIPS is complex and unnecessary

Changes:

This is a breaking change only if applications were directly reading PLATFORM_RELATIONSHIPS. Applications should use the simpler environment variables instead:

  • Database: MARIADB_HOST, MYSQL_HOST, POSTGRES_HOST, or DB_HOST
  • Redis: REDIS_HOST, CACHE_HOST
  • Services: Mapped via .environment file

🤖 Generated with Claude Code

, fixes #15

* #13
* #15

PLATFORM_RELATIONSHIPS caused two major problems:
1. The `upsun` CLI detected it and behaved as if running in production, causing `ddev pull upsun` to fail with empty database dumps (#13)
2. PLATFORM_RELATIONSHIPS was incomplete, missing opensearch and memcached services (#15)

Removed PLATFORM_RELATIONSHIPS entirely from generated environment variables because:
- Applications don't actually need it - they use simpler env vars (MARIADB_HOST, DB_HOST, etc.)
- The .environment file already maps service variables to application-expected variables
- It confuses the upsun CLI into production mode
- Building a complete PLATFORM_RELATIONSHIPS is complex and unnecessary

Changes:
- PlatformEnvironmentGenerator.php: Removed PLATFORM_RELATIONSHIPS from generatePlatformVariables()
- common-assertions.bash: Removed test that verified PLATFORM_RELATIONSHIPS structure
- Added explanatory comments linking to issue #13

This is a breaking change only if applications were directly reading PLATFORM_RELATIONSHIPS.
Applications should use the simpler environment variables instead:
- Database: MARIADB_HOST, MYSQL_HOST, POSTGRES_HOST, or DB_HOST
- Redis: REDIS_HOST, CACHE_HOST
- Services: Mapped via .environment file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@rfay rfay marked this pull request as ready for review October 23, 2025 00:23
@rfay rfay merged commit 4abde1c into main Oct 23, 2025
12 checks passed
@rfay rfay deleted the 20251022_remove_PLATFORM_RELATIONSHIPS branch October 23, 2025 00:24
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.

2 participants