Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - Deployment test mode stopped working on version @sap/ux-ui5-tooling:1.13.2 #1873

Open
3 tasks
eurushibata opened this issue Apr 28, 2024 · 8 comments
Open
3 tasks
Assignees
Labels
bug Something isn't working deploy-tooling @sap-ux/deploy-tooling

Comments

@eurushibata
Copy link

eurushibata commented Apr 28, 2024

Related Feature

Feature request: issue number

Description

Since upgrading to @sap/ux-ui5-tooling version 1.13.2, the deploy command with test mode stopped.

Steps to Reproduce

Steps to reproduce the behavior:
try to deploy with test mode to ABAP system.

fiori deploy --config ui5-deploy.yaml --testMode -- -y

Expected results

Expect the deployment test to finish. On version 1.13.1:

> fiori deploy --config ui5-deploy.yaml --testMode -- -y
info abap-deploy-task /SLSUI/SET_PAR2 Creating archive with UI5 build result.
info abap-deploy-task /SLSUI/SET_PAR2 Archive created.
info abap-deploy-task /SLSUI/SET_PAR2 Starting to deploy in test mode.
info abap-deploy-task /SLSUI/SET_PAR2 /SLSUI/SET_PAR2 found on target system: true
info abap-deploy-task /SLSUI/SET_PAR2 Test run has indicated no problems
info abap-deploy-task /SLSUI/SET_PAR2 ***** Upload of SAPUI5 App or Library from ZIP-Archive into SAPUI5 ABAP Repository *****
info abap-deploy-task /SLSUI/SET_PAR2 
info abap-deploy-task /SLSUI/SET_PAR2 Running in test mode: Upload operations are indicated but not excuted, detailed log
info abap-deploy-task /SLSUI/SET_PAR2 
info abap-deploy-task /SLSUI/SET_PAR2 93 Files found in Archive.
info abap-deploy-task /SLSUI/SET_PAR2 
info abap-deploy-task /SLSUI/SET_PAR2 * Parameters *
info abap-deploy-task /SLSUI/SET_PAR2 
info abap-deploy-task /SLSUI/SET_PAR2 The file '.Ui5RepositoryTextFiles' is considered to identify text files.
info abap-deploy-task /SLSUI/SET_PAR2 The binary files are identified using the standard settings.
info abap-deploy-task /SLSUI/SET_PAR2 The files and folders to be ignored are determined from the built-in standard settings.
info abap-deploy-task /SLSUI/SET_PAR2 The name of the SAPUI5 repository "/SLSUI/SET_PAR2" has been determined from the corresponding import parameter.
info abap-deploy-task /SLSUI/SET_PAR2 Transport Request "SGHK001857" has been determined from the corresponding import parameter.
info abap-deploy-task /SLSUI/SET_PAR2 The external Code Page Name "UTF8" has been determined from the corresponding import parameter.
info abap-deploy-task /SLSUI/SET_PAR2 The acceptance of Unix style end of line markers in text files has been determined from the corresponding import parameter.
info abap-deploy-task /SLSUI/SET_PAR2 Unix style end of line markers in text files get accepted.
info abap-deploy-task /SLSUI/SET_PAR2 The delta mode has been turned on.
info abap-deploy-task /SLSUI/SET_PAR2 Running in safe mode
info abap-deploy-task /SLSUI/SET_PAR2 
info abap-deploy-task /SLSUI/SET_PAR2 
info abap-deploy-task /SLSUI/SET_PAR2 * Operations *
info abap-deploy-task /SLSUI/SET_PAR2 
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : .Ui5RepositoryTextFiles (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : Component-dbg.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : Component-dbg.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : Component-preload.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : Component-preload.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : Component.d.ts (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : Component.d.ts.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : Component.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : Component.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : Component.ts (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ (Folder already exists)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/BaseController-dbg.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/BaseController-dbg.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/BaseController.d.ts (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/BaseController.d.ts.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/BaseController.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/BaseController.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/BaseController.ts (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/chooseOptionStep-dbg.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/chooseOptionStep.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/chooseOptionStep.controller.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/configureParametersStep-dbg.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/configureParametersStep.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/configureParametersStep.controller.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ErrorHandler-dbg.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ErrorHandler.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ErrorHandler.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/Main-dbg.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/Main.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/Main.controller.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/paramConfig-dbg.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/paramConfig.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/paramConfig.controller.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ParameterConfiguration-dbg.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ParameterConfiguration-dbg.controller.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ParameterConfiguration.controller.d.ts (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ParameterConfiguration.controller.d.ts.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ParameterConfiguration.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ParameterConfiguration.controller.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/ParameterConfiguration.controller.ts (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/SetParameters-dbg.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/SetParameters.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/SetParameters.controller.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/summaryStep-dbg.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/summaryStep.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/summaryStep.controller.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/transAreaSettings-dbg.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/transAreaSettings.controller.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : controller/transAreaSettings.controller.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : css/ (Folder already exists)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : css/styles.css (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : i18n/ (Folder already exists)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : i18n/i18n_en_IE.properties (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : i18n/i18n_en.properties (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : index.d.ts (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : manifest.json (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : mockdata.json (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/ (Folder already exists)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/dataHelper-dbg.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/dataHelper.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/dataHelper.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/interfaces-dbg.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/interfaces-dbg.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/interfaces.d.ts (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/interfaces.d.ts.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/interfaces.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/interfaces.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/interfaces.ts (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/mapper-dbg.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/mapper.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/mapper.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/models-dbg.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/models.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/models.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/validator-dbg.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/validator.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : model/validator.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : resources.json (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : sap-ui-cachebuster-info.json (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : utils/ (Folder already exists)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : utils/formatter-dbg.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : utils/formatter.js (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : utils/formatter.js.map (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/ (Folder already exists)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/chooseOptionStep.view.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/configureParametersStep.view.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/fragment/ (Folder already exists)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/fragment/addDevSystemDialog.fragment.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/fragment/configTrans.fragment.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/fragment/generalConfig.fragment.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/fragment/transAreaDialog.fragment.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/fragment/worklistInfo.fragment.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/Main.view.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/paramConfig.view.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/ParameterConfiguration.view.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/popover/ (Folder already exists)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/popover/CollectionsPopover.fragment.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/popover/DevSysPopover.fragment.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/SetParameters.view.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/summaryStep.view.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 NONE          : view/transAreaSettings.view.xml (Text) (Already up-to-date)
info abap-deploy-task /SLSUI/SET_PAR2 
info abap-deploy-task /SLSUI/SET_PAR2 Test run has indicated no problems
info abap-deploy-task /SLSUI/SET_PAR2 
info abap-deploy-task /SLSUI/SET_PAR2 * Done *
info abap-deploy-task /SLSUI/SET_PAR2 Deployment in TestMode completed. A successful TestMode execution does not necessarily mean that your upload will be successful.

Actual results

On version 1.13.2:

  > fiori deploy --config ui5-deploy.yaml --testMode -- -y
  info abap-deploy-task /SLSUI/SET_PAR2 Creating archive with UI5 build result.
  info abap-deploy-task /SLSUI/SET_PAR2 Archive created.
  info abap-deploy-task /SLSUI/SET_PAR2 Starting to deploy in test mode.
  error abap-deploy-task /SLSUI/SET_PAR2 Deployment has failed.
  error abap-deploy-task /SLSUI/SET_PAR2 Change logging level to debug your issue
  error abap-deploy-task /SLSUI/SET_PAR2  (see examples https://github.com/SAP/open-ux-tools/tree/main/packages/deploy-tooling#configuration-with-logging-enabled)
  error builder:custom deploy-to-abap client.trim is not a function
  Command deploy failed with error : client.trim is not a function

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}

@longieirl longieirl added the deploy-tooling @sap-ux/deploy-tooling label Apr 29, 2024
@longieirl longieirl self-assigned this Apr 29, 2024
@longieirl
Copy link
Contributor

longieirl commented Apr 29, 2024

Hi,

I'm struggling to reproduce the issue both locally on mac and on Business Application Studio using either 1.13.2 and the latest 1.13.3.

Can you share your ui5-deploy.yaml please? Please obfuscate any sensitive data please. Do you know the reason why the HTTP request is failing as I might be able to reduce the HTTP error code to understand the flow more.

You can also add more verbose logging, by adding the verbose flag;

  customTasks:
    - name: deploy-to-abap
      afterTask: generateCachebusterInfo
      configuration:
        verbose: true
        target: ...

Could you also share some further details?
Your node version?

node -v

Your OS? Mac | Linux | Windows

Thanks.
John

@eurushibata
Copy link
Author

Hi John, I am using vscode on macos.

I was not able to determine, even raising the log level to 5 as it stops here:

error builder:custom deploy-to-abap client.trim is not a function

here it goes my ui5-build.yaml

# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json

specVersion: "3.1"
type: application
metadata:
  name: gsslsui.environment.set_up_param2
  copyright: |-
    SOL UI - https://github.wdf.sap.corp/SAPLanguagePlatform/SolUIs
    * (c) Copyright 2017-${currentYear} SAP
resources:
  configuration:
    propertiesFileSourceEncoding: UTF-8
    paths:
      webapp: webapp
framework:
  name: SAPUI5
  version: 1.96.17
builder:
  resources:
    excludes:
      - /test/**
      - /localService/**
  customTasks:
    - name: deploy-to-abap
      afterTask: generateCachebusterInfo
      configuration:
        target:
          url: xxxxx
          client: 000
          auth: basic
        credentials:
          username: env:FIORI_TOOLS_USER
          password: env:FIORI_TOOLS_PASSWORD
        app:
          name: /SLSUI/SET_PAR2
          description: Set the parameters for an evaluation 2
          package: /SLSUI/UI_ENVIRONMENT
          transport: xxxxx
        exclude:
          - /test/

If you need more information on reproducing, please message me on SAP MSteams.

@longieirl
Copy link
Contributor

Ok! So I'm able to recreate the issue with the following sample ui5-deploy.yaml;

# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json

specVersion: "3.1"
metadata:
  name: jlapril2024med
  copyright: |-
    SOL UI - https://github.wdf.sap.corp/SAPLanguagePlatform/SolUIs
    * (c) Copyright 2017-${currentYear} SAP
type: application
resources:
  configuration:
    propertiesFileSourceEncoding: UTF-8
    paths:
      webapp: webapp
framework:
  name: SAPUI5
  version: 1.96.17
builder:
  resources:
    excludes:
      - /test/**
      - /localService/**
  customTasks:
    - name: deploy-to-abap
      afterTask: generateCachebusterInfo
      configuration:
        verbose: true
        ignoreCertError: true
        target:
          client: 000
          url: https://myabaphost:44300
          auth: basic
        credentials:
          username: env:FIORI_TOOLS_USER
          password: env:FIORI_TOOLS_PASSWORD          
        app:
          name: ZPROD04280950
          description: Set the parameters for an evaluation 2
          package: $tmp
          transport: ""
        exclude:
          - /test/

I've added the verbose flag which produces the following output;

error abap-deploy-task ZPROD04280950 Deployment has failed.
debug abap-deploy-task ZPROD04280950 {
debug abap-deploy-task ZPROD04280950   verbose: true,
debug abap-deploy-task ZPROD04280950   ignoreCertError: true,
debug abap-deploy-task ZPROD04280950   target: {
debug abap-deploy-task ZPROD04280950     client: 0,
debug abap-deploy-task ZPROD04280950     url: 'https://myabaphost:44300',
debug abap-deploy-task ZPROD04280950     auth: 'basic'
debug abap-deploy-task ZPROD04280950   },
debug abap-deploy-task ZPROD04280950   credentials: 'hidden',
debug abap-deploy-task ZPROD04280950   app: {
debug abap-deploy-task ZPROD04280950     name: 'ZPROD04280950',
debug abap-deploy-task ZPROD04280950     description: 'Set the parameters for an evaluation 2',
debug abap-deploy-task ZPROD04280950     package: '$tmp',
debug abap-deploy-task ZPROD04280950     transport: ''
debug abap-deploy-task ZPROD04280950   },
debug abap-deploy-task ZPROD04280950   exclude: [ '/test/' ],
debug abap-deploy-task ZPROD04280950   yes: true,
debug abap-deploy-task ZPROD04280950   strictSsl: false,
debug abap-deploy-task ZPROD04280950   configPath: 'ui5-deploy.yaml',
debug abap-deploy-task ZPROD04280950   testMode: true,
debug abap-deploy-task ZPROD04280950   log: 5,
debug abap-deploy-task ZPROD04280950   test: true,
debug abap-deploy-task ZPROD04280950   safe: true,
debug abap-deploy-task ZPROD04280950   keep: true,
debug abap-deploy-task ZPROD04280950   cli: false
debug abap-deploy-task ZPROD04280950 }

As you can see, the client is being interrupted as 0 instead of 000 from the cli.
The quick fix is to wrap it in quotes i.e.

client: "000"

I will investigate the code to see if it can be handled better.
John

@longieirl longieirl added the bug Something isn't working label Apr 30, 2024
@eurushibata
Copy link
Author

@longieirl thank you for the first analysis.

The error does make sense as if there is possibily a boolean verification against the client field:

  if (target.client) {
      ...
   } )

it will return as boolean false and therefore could be the reason of this error. Well definitelly something on this version changed as we've always used without quotes.

I'll stick with the older version for now and wait what is the resolution.

Thank you,
Emerson

@longieirl
Copy link
Contributor

Hi,
Here is some code to replicate the issue;

import { parseDocument } from 'yaml';
import { readFileSync } from 'fs';
import { join } from 'path';

const yaml = parseDocument(readFileSync(join(process.cwd(), 'ui5-deploy.yaml'), 'utf8')).toJSON();

console.log(`>>> ${JSON.stringify(yaml)}`);

The parseDocument method is returning 0 instead of 000 and then in the deploy-tooling, the client is passed as an integer instead of a string;

this.client = client?.trim();

There are two fixes required;

In @sap/ux-ui5-tooling when we parse the yaml document, pad out the value and also apply more validation in deploy-tooling when handling the input parameters.

@longieirl
Copy link
Contributor

Also, when you create the deployment config using the SAP Fiori tools wizard, it will create the following configuration with the client correctly quoted;

  customTasks:
    - name: deploy-to-abap
      afterTask: generateCachebusterInfo
      configuration:
        target:
          url: https://myabaphost:44300
          client: "000"
        app:
          name: TEST
          package: $tmp
          transport: ""
        exclude:
          - /test/

However, the fixes still need to be applied to prevent this exception if the yaml configuration is manually changed.

@longieirl
Copy link
Contributor

@eurushibata what is strange, I'm able to reproduce this issue on all versions i.e. 1.13.1 and 1.11.5.

To ensure this value is correctly handled i.e. the appropiate client ID is passed to any HTTP calls, I would ensure that its double quoted. For example, if you search for any YAML formatters online it will change 000 to 0 which is not the correct client ID when passed to the ABAP backend.

@eurushibata
Copy link
Author

eurushibata commented May 1, 2024

@longieirl thank you for the analysis. I'll change it to have in quotes from my end but weird that it worked all time for us.
(we have in our repo version "@sap/ux-ui5-tooling": "^1.8.2") that worked without quotes even, so definitely something that was introduced (perhaps one of the npm required libraries introduced it).

Maybe the rootcause isn't exactly the 000, but some other stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deploy-tooling @sap-ux/deploy-tooling
Projects
None yet
Development

No branches or pull requests

2 participants