Skip to content

Conversation

@nikmace
Copy link
Contributor

@nikmace nikmace commented Oct 31, 2025

Feat for #3789.

  • Adds a new middleware that adds a token for each request to OData for Cloud Foundry ADP.
  • Changes the CF project structure to support the new middleware and work in preview and in Adaptation Editor.
  • Adjust preview-middleware code to support CF projects.

@nikmace nikmace self-assigned this Oct 31, 2025
@nikmace nikmace requested review from a team as code owners October 31, 2025 09:22
@nikmace nikmace added preview-middleware @sap-ux/preview-middleware adp-tooling generator-adp @sap-ux/generator-adp labels Oct 31, 2025
@changeset-bot
Copy link

changeset-bot bot commented Oct 31, 2025

🦋 Changeset detected

Latest commit: bb0111d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@sap-ux/backend-proxy-middleware-cf Patch
@sap-ux/preview-middleware Patch
@sap-ux/generator-adp Patch
@sap-ux/adp-tooling Patch
@sap-ux/create Patch
@sap-ux/adp-flp-config-sub-generator Patch
@sap-ux/flp-config-inquirer Patch
@sap-ux/flp-config-sub-generator Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nikmace nikmace requested a review from a team as a code owner October 31, 2025 10:13
@IainSAP
Copy link
Contributor

IainSAP commented Nov 10, 2025

@nikmace Using CF to discover systems and connect is something we already support using axios-extension and https://github.com/SAP/open-ux-tools/blob/main/packages/odata-service-inquirer/src/prompts/datasources/sap-system/abap-on-btp/questions.ts#L216. Is this not sufficent for this use case. Any connectivity features should be added to axios extension, but I believe there is nothing new here?

@nikmace
Copy link
Contributor Author

nikmace commented Nov 10, 2025

@nikmace Using CF to discover systems and connect is something we already support using axios-extension and https://github.com/SAP/open-ux-tools/blob/main/packages/odata-service-inquirer/src/prompts/datasources/sap-system/abap-on-btp/questions.ts#L216. Is this not sufficent for this use case. Any connectivity features should be added to axios extension, but I believe there is nothing new here?

Our use case is completely different. We are trying to support Cloud Foundry Adaptation Projects in the Adaptation Editor - that is the goal. We are not having issues with connectivity, and I don't see a reason to enhance axios-extension because we don't need to use any methods from it like we do with AbapServiceProvider (ABAP and Cloud Foundry are two different things).

All we need to do is get the service keys from business service, make a call to fetch an authorization token, and attach it to the request headers. Then, authentication is going to happen programatically, service-to-service. For example, for OData, which is linked to a destination and needs authorization. Maybe I don't understand something but I can't see how enhacing axios-extension is going to help us.

We are talking about different scenarios, in my opinion. Let's follow up during the meeting. 👍🏻

Copy link
Contributor

@heimwege heimwege left a comment

Choose a reason for hiding this comment

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

See comments. I just had a look at the backend-proxy-middleware-cf and preview-middleware changes. Can't really comment on the adp packages.

* @param logger logger instance
* @throws Error in case no manifest.appdescr_variant found
*/
export async function initAdp(
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: Why is initAdp not a function of the class FlpSandbox? As it seems to rely on a specific instance flp: FlpSandbox this could be improved by just making it a function of that instance so that this can be used. Also flp as property name is misleading because there's a config property of the preview-middleware named flp as well.
I know all of this is not related to this PR but something I learned doing the review 🐱

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed In: 4bcb65b

voicis
voicis previously approved these changes Nov 28, 2025
Copy link
Contributor

@voicis voicis left a comment

Choose a reason for hiding this comment

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

@nikmace nikmace requested a review from heimwege December 1, 2025 07:43
heimwege
heimwege previously approved these changes Dec 1, 2025
Copy link
Contributor

@heimwege heimwege left a comment

Choose a reason for hiding this comment

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

  • review comments have been addressed
  • test coverage is great
  • changeset exists
  • code changes to preview-middleware & new cf proxy middleware looks good (did not review adp-tooling and generator-adp packages)
  • did NOT test manually

@testojs testojs self-requested a review December 1, 2025 08:46
@nikmace nikmace dismissed stale reviews from heimwege and voicis via 67af1d9 December 1, 2025 11:44
@nikmace nikmace requested review from heimwege and voicis December 2, 2025 13:57
Copy link
Contributor

@testojs testojs left a comment

Choose a reason for hiding this comment

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

  • change looks good
  • changeset is OK
  • excellent test coverage
  • do not test manually

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 2, 2025

Copy link
Contributor

@voicis voicis left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@heimwege heimwege left a comment

Choose a reason for hiding this comment

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

re-approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adp-tooling generator-adp @sap-ux/generator-adp preview-middleware @sap-ux/preview-middleware

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants