Skip to content

Conversation

@kiril-keranov
Copy link
Contributor

This fixes this issue

@kiril-keranov kiril-keranov changed the title Fix postgresql framework detection in go-based buildpack Fix postgresql and general framework detection in go-based buildpack Jan 22, 2026
ramonskie added a commit that referenced this pull request Jan 22, 2026
This comprehensive fix addresses root causes reported in issue #1152,
affecting not just PostgreSQL but 6 additional frameworks.

CORE LIBRARY FIXES (src/java/common/context.go):

1. HasService() - Now case-insensitive
   - Handles service label variations (PostgreSQL vs postgresql)
   - Affects 19+ frameworks automatically

2. HasTag() - Now case-insensitive
   - Handles tag casing variations across service brokers
   - Affects 19+ frameworks automatically

3. HasServiceByNamePattern() - Now searches ALL service labels
   - Fixes broker-provided service detection (postgresql, mysql, etc.)
   - Was limited to 'user-provided' only
   - Affects 19+ frameworks automatically

FRAMEWORK-SPECIFIC FIXES:

4. PostgreSQL JDBC - Use centralized ContainsIgnoreCase helper
5. MariaDB JDBC - Use centralized ContainsIgnoreCase helper
6. Elastic APM Agent - Simplified detection logic, use helpers consistently
7. Luna Security Provider - Use centralized ContainsIgnoreCase helper
8. ProtectApp Security Provider - Use centralized ContainsIgnoreCase helper
9. Seeker Security Provider - Use centralized ContainsIgnoreCase helper

BENEFITS:
- Single fix point for case-insensitive matching
- Consistent behavior across all 25+ frameworks
- Eliminates code duplication
- More robust detection for various service broker conventions

Supersedes PR #1153 with comprehensive systemic fix.

Fixes #1152
@ramonskie ramonskie merged commit 1550efb into cloudfoundry:feature/go-migration Jan 23, 2026
1 check passed
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