Skip to content

Conversation

@abhishekkumams
Copy link
Contributor

@abhishekkumams abhishekkumams commented Jan 31, 2023

Why make this change?

  • Closes Missing configuration file name in printed message #1128
    • Inconsistent logs printing config file for add command.
    • In the below screenshot we can see that we print the config file name and then in the next line we intend to print again config: , but it doesn't print anything when the user doesn't provide it in the options. This is an inconsistent behavior.
      image

What is this change?

  • config file name is already printed in the previous line that is being used with add/update/start command.
  • I updated the inconsistent log which was printing the config file again, which was redundant.

What was the root cause?

  • when user was not providing the config name through cli, options.config was empty and hence the config name was not getting printed.

How was this tested?

  • Unit Tests : Updated a test to verify that config name is printed with all the dab commands.

Sample Request(s)

image

dab add MyEntity -s my_entity --permissions "anonymous:*"

Information: Microsoft.DataApiBuilder 1.0.0
Information: Config not provided. Trying to get default config based on DAB_ENVIRONMENT...
Found config file: dab-config.json.
Information: Added new entity: MyEntity with source: dbo.my_entity and permissions: anonymous:*.
Information: SUGGESTION: Use 'dab update [entity-name] [options]' to update any entities in your config.

@abhishekkumams abhishekkumams self-assigned this Jan 31, 2023
@abhishekkumams abhishekkumams added bug Something isn't working cli labels Jan 31, 2023
@abhishekkumams abhishekkumams added this to the Jan2023 milestone Jan 31, 2023
Copy link
Contributor

@seantleonard seantleonard left a comment

Choose a reason for hiding this comment

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

nit

@abhishekkumams abhishekkumams merged commit 172fc0c into main Feb 1, 2023
@abhishekkumams abhishekkumams deleted the dev/abhishekkuma/missing-configuration-file-name-in-printed-message branch February 1, 2023 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cli

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Missing configuration file name in printed message

5 participants