Skip to content

chore: VCAP_SERVICES_FILE_PATH compatibility using greedy matchers#407

Open
PDT42 wants to merge 17 commits into
mainfrom
feat/vcap-services-file-path-greedy-matchers
Open

chore: VCAP_SERVICES_FILE_PATH compatibility using greedy matchers#407
PDT42 wants to merge 17 commits into
mainfrom
feat/vcap-services-file-path-greedy-matchers

Conversation

@PDT42

@PDT42 PDT42 commented Jan 19, 2026

Copy link
Copy Markdown
Contributor

Improve VCAP_SERVICES Service Binding Resolution with Greedy Matchers

Chore

🔧 Updated service instance matching for SAP Cloud Logging and Dynatrace to use greedy (array-based) VCAP matchers, extending the default matching without breaking existing behavior. Error messages and documentation have been updated to guide users toward the correct configuration.

Changes

  • package.json: Updated vcap matching for telemetry-to-dynatrace and telemetry-to-cloud-logging from a single object to an array of matchers. Dynatrace now matches by label: "dynatrace" or tag: "dynatrace"; Cloud Logging matches by label: "cloud-logging" or tag: "Cloud Logging".

  • lib/utils.js: Improved inline comments to clearly document the legacy compatibility behavior for getCredsForDTAsUPS() and getCredsForCLSAsUPS(). Updated the warning message for Cloud Logging user-provided services to recommend only the "Cloud Logging" tag (dropped "cloud-logging" from the recommendation).

  • lib/logging/index.js, lib/metrics/index.js, lib/tracing/index.js: Improved error messages when credentials are not found — now explicitly instruct users to ensure the bound service instance uses the correct tag ("Cloud Logging" or "dynatrace").

  • README.md: Clarified that user-provided service instances for SAP Cloud Logging must use the tag "Cloud Logging" (removed reference to the legacy cloud-logging tag). Added a tip with the cf update-user-provided-service command and a link to CAP's service binding documentation.

  • 🔄 Regenerate and Update Summary
PR Bot Information

Version: 1.26.5

  • Correlation ID: 81bbd7c7-2290-4812-89e9-d178ac318c25
  • Event Trigger: issue_comment.edited

Comment thread README.md Outdated
Comment thread README.md Outdated
Co-authored-by: sjvans <30337871+sjvans@users.noreply.github.com>

@hyperspace-insights hyperspace-insights Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The PR makes good improvements — error messages are more actionable, matching predicates are extended via vcap arrays, and comments are clearer. The one substantive issue is that the silent match on the deprecated "cloud-logging" tag in getCredsForCLSAsUPS() is inconsistent with the PR's stated intent to promote "Cloud Logging" as the sole required tag; it should emit the same deprecation warning as the name-based fallback.

PR Bot Information

Version: 1.26.5

  • File Content Strategy: Full file content
  • LLM: anthropic--claude-4.6-sonnet
  • Event Trigger: pull_request.ready_for_review
  • Correlation ID: 957f0e1c-6868-4b5a-9282-5da4a9e4f2b7

Comment thread lib/utils.js
@sjvans sjvans enabled auto-merge (squash) June 22, 2026 14:22
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