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

Nugetization refactor of DataApiBuilder #1539

Merged
merged 23 commits into from
Jul 5, 2023
Merged

Conversation

rohkhann
Copy link
Contributor

@rohkhann rohkhann commented Jun 21, 2023

Why make this change?

This change is being made to allow nugetization of generic IP of Data api builder so that it can be consumed as a nuget by separate projects. There is no logic change or user experience change in this pr. It is a refactor of all the IP classes used by dab components into a separate c# library. Change has been internally discussed with DAB team as part of nugetization effort for DAB IP. This is an initial draft pr.

What is this change?

Created a new c# class library project that references auth and config projects. Moved all the folders from Service project to the new c# class project.

Pr is split into three commits for easier review:

  1. In commit 1, I just copied over the files into Microsoft.AzureDataApiBuilderSDK from the Service project and added appropriate references to the auth and config projects. Also did the renaming of the namespaces
  2. In commit 2, I changed the references of all existing code to use the appropriate helpers from this SDK rather than the same folders on the Service project.
  3. In commit 3, I deleted the folders from the service project.

Folders moved out of service to new project Azure.DataApiBuilder.Core:

  1. AuthenticationHelpers
  2. Authorization
  3. Configurations
  4. Models
  5. Parsers
  6. Resolvers
  7. Services

New file created: Utils.cs in Core.

Service Old Folder Structure:
image

Service project New Folder Structure:
image

How was this tested?

  • Integration Tests
    Ran data api builder locally against mssql db
  • Unit Tests
    Ran unit tests listed on the contributions guidelines page

Sample Request(s)

  • Example REST and/or GraphQL request to demonstrate modifications
    No logic or workflow changes, just moving of files to a seperate project and reference changes
  • Example of CLI usage to demonstrate modifications
    No logic or workflow changes, just moving of files to a seperate project and reference changes

@rohkhann rohkhann requested a review from abhishekkumams June 26, 2023 21:01
Copy link
Member

@mbhaskar mbhaskar left a comment

Choose a reason for hiding this comment

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

Thank you for the changes. Could you also probably add basic design/block diagram of the proposed structure and how it is used? If you already have it in any other design doc, please link it here

@Aniruddh25 Aniruddh25 changed the title Nugetization refactor of DataApiBuiler Nugetization refactor of DataApiBuilder Jun 28, 2023
Copy link
Contributor

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

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

Some tidy ups proposed.

@rohkhann rohkhann requested review from aaronpowell and mbhaskar June 28, 2023 17:31
Copy link
Contributor

@Aniruddh25 Aniruddh25 left a comment

Choose a reason for hiding this comment

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

Overall looks good, left few rename suggestions.

Copy link
Contributor

@aaronpowell aaronpowell left a comment

Choose a reason for hiding this comment

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

Really minor nit (can be ignored), otherwise good once tests pass.

rohkhann and others added 2 commits July 5, 2023 09:34
Making class static

Co-authored-by: Aaron Powell <me@aaron-powell.com>
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.

Looks good, one nit about now-unneeded code

@rohkhann rohkhann merged commit 7b5899c into main Jul 5, 2023
@rohkhann rohkhann deleted the rohkhann/NugetSDKSupportDAB branch July 5, 2023 18:06
@Aniruddh25 Aniruddh25 added this to the 0.8 milestone Jul 5, 2023
@Aniruddh25 Aniruddh25 linked an issue Jul 5, 2023 that may be closed by this pull request
@Aniruddh25 Aniruddh25 removed this from the 0.8 milestone Jul 5, 2023
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

Successfully merging this pull request may close these issues.

Refactor Service into Core components
6 participants