Skip to content

Conversation

@panayotmarinov
Copy link
Contributor

@panayotmarinov panayotmarinov commented Aug 20, 2025

Context

https://jira.tools.sap/browse/UC-8026

This pull request introduces the integration of seamless handling of cross-level consumption of destination-fragment pairs with the Transparent Proxy. As a user, this allows you to consume these pairs on different levels, such as the subaccount and subscription level, enabling more flexible SaaS setup configurations without the need for duplication.

Feature scope:

  • Implement the integration between Transparent proxy and Cloud SDK for seamless handling of cross-level consumption of destination-fragment pairs
  • Implement relevant unit tests for the task

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Documentation updated
  • Release notes updated

@cla-assistant
Copy link

cla-assistant bot commented Aug 20, 2025

CLA assistant check
All committers have signed the CLA.

@panayotmarinov panayotmarinov changed the title Seamless handling of Cross-level consumption of destination-fragment pairs Transparent Proxy: Seamless handling of Cross-level consumption of destination-fragment pairs Aug 20, 2025
Copy link
Member

@MatKuhr MatKuhr left a comment

Choose a reason for hiding this comment

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

please also update the PR description and sign the CLA 😉

* @return This builder instance for method chaining.
*/
@Nonnull
public DynamicBuilder destinationLevel( @Nonnull final String destinationLevel )
Copy link
Member

Choose a reason for hiding this comment

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

I assume this is either "subaccount" or "instance". For such cases, we usually use enums and, in fact, just introduced one: https://github.com/SAP/cloud-sdk-java/blob/main/cloudplatform/connectivity-destination-service/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/DestinationServiceOptionsAugmenter.java#L139

But I also assume the two provider options don't apply to transparent Proxy? If it's just two options and not 4, then you could also consider to default to subaccount and just add one method without args to explicitly change it to .instanceLevel() From the test code below it looks like provider is also supported, then let's reuse the enum.

What is the behavior of TP if nothing is given? I assume subaccount?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are four possible values for both destinationLevel and fragmentLevel - "provider_subaccount", "provider_instance", "subaccount" and "instance". The behaviour of the TP if nothing is given matches that of the Destination Service - the "default level" is "instnace ".

I have applied the DestinationServiceOptionsAugmenter.CrossLevelScope enum which fits perfectly for this scenario.

Copy link
Member

Choose a reason for hiding this comment

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

the "default level" is "instnace ".

for the /v2 consume API yes, for the /v1 find destination it will fallback to subaccount. So I assume TP uses /v2 under the hood?

Because the Cloud SDK behaves according to /v1 by default, and only if cross-level is enabled, it uses /v2...

Copy link
Contributor Author

@panayotmarinov panayotmarinov Sep 5, 2025

Choose a reason for hiding this comment

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

That is correct. The Transparent proxy works analogically - it uses the /v2 consume API when levels are defined in a either in a destination CR or as headers (the approach used in TP-CloudSDK integration). Otherwise the /v1 API is used by default.

@MatKuhr MatKuhr added do not merge Pull request must not be merged do not review Pull request should not be reviewed labels Sep 4, 2025
@MatKuhr MatKuhr marked this pull request as draft September 4, 2025 10:49
@MatKuhr
Copy link
Member

MatKuhr commented Sep 4, 2025

applied there with the next transparent proxy release.

Got it, I now marked this PR as draft and we can merge it once the release is available. @panayotmarinov kindly ping us when the release is ready and the PR has been finalized (merge conflicts, PR description, etc.). Thanks!

@panayotmarinov panayotmarinov marked this pull request as ready for review September 5, 2025 15:01
@panayotmarinov panayotmarinov force-pushed the crosslevelconsumption branch 3 times, most recently from a7f84a5 to 89da889 Compare September 10, 2025 08:22
@panayotmarinov
Copy link
Contributor Author

applied there with the next transparent proxy release.

Got it, I now marked this PR as draft and we can merge it once the release is available. @panayotmarinov kindly ping us when the release is ready and the PR has been finalized (merge conflicts, PR description, etc.). Thanks!

The PR ready for review now

@MatKuhr MatKuhr removed do not merge Pull request must not be merged do not review Pull request should not be reviewed labels Oct 30, 2025
Copy link
Member

@MatKuhr MatKuhr left a comment

Choose a reason for hiding this comment

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

@panayotmarinov if not provided, what is the default for the two? Maybe you can clarify by adding that info to the Javadoc. Otherwise LGTM!

@MatKuhr MatKuhr merged commit a6a06b5 into SAP:main Oct 30, 2025
14 checks 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