Fix systemic service detection issues across all frameworks #1154
+39
−66
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR comprehensively fixes the root causes reported in issue #1152, affecting not just PostgreSQL but 6 additional frameworks.
Supersedes: #1153 (provides more comprehensive fix)
Fixes: #1152
Problem
Service detection was broken in two ways:
HasServiceByNamePattern()only searched "user-provided" services, missing broker-provided servicesSolution
Core Library Fixes (
src/java/common/context.go)HasService()- Now case-insensitive, iterates all service labels (affects 19+ frameworks automatically)HasTag()- Now case-insensitive tag comparison (affects 19+ frameworks automatically)HasServiceByNamePattern()- Now searches ALL service labels, not just "user-provided" (affects 19+ frameworks automatically)Framework-Specific Fixes (6 frameworks)
Standardized to use
common.ContainsIgnoreCase()helper:Testing
Impact