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 - abap-inquirer is handling connectivity differently, if the sap client is passed as undefined instead of an empty string #2401

Open
2 of 3 tasks
longieirl opened this issue Sep 23, 2024 · 0 comments

Comments

@longieirl
Copy link
Contributor

Related Feature

Found when testing #2128

Description

A serviceProvider object is created and validated, user tries to invoke the ABAP-inq using the same serviceProvider object but passing in client as undefined;

const abapTarget = {
        URL: 'https://~test.sap,
        client: undefined,
        scp: false
    };

Calling the the ABAP inq prompting;

    return getPrompts(
        {
            backendTarget: {
                abapTarget,
               'test',
                serviceProvider,
                type: 'application'
            },
            existingDeployTaskConfig: ui5DeployConfig?.app, // Used to pre-populate the answers
            indexGenerationAllowed,
            useAutocomplete: true,
            showOverwriteQuestion: overwriteQuestion
        } as AbapDeployConfigPromptOptions,
        DeploymentGenerator.logger as unknown as Logger,
        getPlatform() !== PLATFORMS.CLI
    );

This results in a HTTP 401 and the user is asked for their credentials.

If the code is updated to pass an empty string, as follows;

const abapTarget = {
        URL: 'https://~test.sap,
        client = '',
        scp: false
    };

Then the HTTP request is successful.

Passing in an empty string or undefined should be treated equally. The calling client should not be expected to preset the client if the value is undefined.

Steps to Reproduce

Steps to reproduce the behavior:

  1. In SAP Fiori tools, create a new project using any template
  2. Create the template using a URL data source
  3. Enter credentials, if required
  4. Select Y to adding deployment configuration
  5. User is prompted for credentials again

Expected results

User should not be prompted for credentials again.

Actual results

User is prompted for credentials.

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}

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

No branches or pull requests

1 participant