Skip to content

BUG - Running cds commands changes the html5 commands affecting build step #3697

@longieirl

Description

@longieirl

Description

Step1. Generate a CAP project using a managed approuter;

cds init managedAppCAPProject && cd  managedAppCAPProject && npm install && cds add tiny-sample && cds add hana && cds add mta && cds add xsuaa && cds add connectivity && cds add destination && cds add html5-repo && cds build --for hana && cp gen/db/package.json db && npm i

Step2. Append a LROP UI page using the SAP Fiori tools wizard.

Step3. Add MTX to existing project;

cds add multitenancy
cds add extensibility

Step4. Build mta archive;

yarn build

The build step fails and there are now extra commands in the html5 module, for example;

Before;

  - name: ui5mtxsql
    type: html5
    path: app/ui5-mtx-sql
    build-parameters:
      build-result: dist
      builder: custom
      commands:
        - npm install --registry=https://registry.npmjs.org/
        - npm run build:cf
      supported-platforms:
        []

After:

  - name: ui5mtxsql
    type: html5
    path: app/ui5-mtx-sql
    build-parameters:
      build-result: dist
      builder: custom
      commands:
        - npm install
        - npm run build:cf
        - npm ci
        - npm run build
      supported-platforms:
        []

Steps to Reproduce

As shown above

Expected results

When running any of the cds commands, the html5 commands shouldnt change or impact the UI5 app already appended.

Actual results

Extra commands are added and impacts the build step which can fail and/or take double the time to build due to the duplication of steps

Screenshots

If applicable, add screenshots to help explain the problem.

Version/Components/Environment

Add any other context about the problem here
OS:

  • Mac OS
  • Windows
  • Other

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}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions