SAP / open-ux-tools

Enable community collaboration to jointly promote and facilitate best in class tooling capabilities
Apache License 2.0
83 stars 40 forks source link

BUG - Custom Task deploy-to-abap fails when using Project Shims #911

Closed UHullen closed 1 year ago

UHullen commented 1 year ago

Description

Today we attempted to deploy our app to an S/4HANA (ABAP) backend with the CustomTask "build-to-abap". The difference to the previous deployment was the introduction of a project-shim, resulting in 2 yaml configurations in 1 yaml file ("ui5-deploy.yaml"). The following error occurs when deploying with "build-to-abap" including a project-shim:

info builder:custom deploy-to-abap Create Archive ERR! builder:custom deploy-to-abap Deployment Failed. You can re-run deployment with the following command to get more detailed log information: ERR! builder:custom deploy-to-abap MacOs/Linux: DEBUG=ux-odata-client npm run deploy ERR! builder:custom deploy-to-abap Windows: set DEBUG=ux-odata-client & npm run deploy ERR! builder:custom deploy-to-abap Source contains multiple documents; please use YAML.parseAllDocuments() at line 25, column 1: ERR! builder:custom deploy-to-abap ERR! builder:custom deploy-to-abap transport: L4SK901557 ERR! builder:custom deploy-to-abap --- # Everything below this line could also be put into the ui5.yaml of a stand… ERR! builder:custom deploy-to-abap ^ ERR! builder:custom deploy-to-abap

The declaration of the project-shim in the yaml file works fine without errors. The app can be run/executed just fine with "fiori run". The "build" task is executed without an error, and only during "fiori deploy", the error occurs.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Add a project-shim to a yaml file that includes CustomTask "deploy-to-abap"
  2. Build the app
  3. Run the deployment script using that yaml file

Our deployment config: (renamed to allow github upload) ui5-deploy.yaml.txt

Version/Components/Environment

Add any other context about the problem here OS:

Root Cause Analysis

Problem

{describe the problem}

Fix

{describe the fix}

Why was it missed

{Some explanation why this issue might have been missed during normal development/testing cycle}

How can we avoid this

{if we don’t want to see this type of issues anymore what we should do to prevent}

tobiasqueck commented 1 year ago

The underlying issues has already been reported at https://github.com/SAP/open-ux-tools/issues/892. Fix is in progress at https://github.com/SAP/open-ux-tools/pull/906

tobiasqueck commented 1 year ago

@UHullen the error when reading the yaml has been fixed with #906 however, I think, by now, you wouldn't define the shim like that anymore but use https://github.com/ui5-community/ui5-ecosystem-showcase/tree/main/packages/ui5-tooling-modules instead. I am closing this one, however, if you still run into issues, please reopen it.

UHullen commented 1 year ago

bugfix validated with ux-ui5-tooling 1.10.4