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

tools/importer-msgraph-metadata: refactor to generate JSON definitions using data-api-sdk #4167

Merged
merged 24 commits into from
Jul 8, 2024

Conversation

manicminer
Copy link
Contributor

@manicminer manicminer commented May 28, 2024

Changes to Data API will be added in a separate PR - this has been implemented in #4217

Currently this should have no net effect on data definitions for Resource Manager.

Screenshot 2024-05-29 at 15 20 24

@manicminer manicminer added enhancement New feature or request tool/importer-rest-api-specs Swagger Data Importer issues tool/msgraph-importer Issues related to the Microsoft Graph importer tool/internal-sdk Related to the internal SDK used in this repository `./tools/sdk` labels May 28, 2024
@manicminer manicminer requested a review from tombuildsstuff May 28, 2024 20:56
@manicminer manicminer force-pushed the msgraph-importer-refactor branch from 672c15c to cd22508 Compare May 28, 2024 21:01
@hashicorp hashicorp deleted a comment from github-actions bot May 28, 2024
@hashicorp hashicorp deleted a comment from github-actions bot May 28, 2024
@hashicorp hashicorp deleted a comment from github-actions bot May 28, 2024
@tombuildsstuff tombuildsstuff self-assigned this May 29, 2024
@manicminer manicminer force-pushed the msgraph-importer-refactor branch from cd22508 to 745ad67 Compare June 3, 2024 20:34
@hashicorp hashicorp deleted a comment from github-actions bot Jun 3, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 3, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 3, 2024
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @manicminer

Thanks for this PR/rebasing this.

I've taken a look through and left some comments inline but on the whole this is looking pretty good - there's 2 main things:

  1. I think it'd be worth introducing a RemoveExistingAPIDefinitions() (or similar) function to allow both the MSGraph importer and the ARM importer to clear any existing data prior to performing an import. Whilst there's some benefits to threading RemoveService through and performing a diff against the dataset to determine what's changed - tbh it's far easier/less code/bug prone to blow away the entire dataset and assume we're working in a clean directory each time. This will necessitate updating both the Graph and ARM importers to call that function prior to importing, but that should be fine?
  2. As discussed offline, can we introduce specific Stages for the CommonTypesConstantStage and CommonTypesModelsStage? Whilst these'll likely be similar to the existing Constant and Models stage, doing this means each Stage remains responsible for the files it's creating (and that the paths aren't defined outside of that), which I think is beneficial?

Other than that though this is looking pretty good, nice one 👍

Thanks!

tools/data-api-repository/repository/helpers/filesystem.go Outdated Show resolved Hide resolved
tools/data-api-repository/repository/helpers/filesystem.go Outdated Show resolved Hide resolved
tools/data-api-repository/repository/helpers/filesystem.go Outdated Show resolved Hide resolved
tools/data-api-repository/repository/helpers/filesystem.go Outdated Show resolved Hide resolved
tools/importer-msgraph-metadata/components/parser/types.go Outdated Show resolved Hide resolved
tools/importer-msgraph-metadata/components/parser/types.go Outdated Show resolved Hide resolved
tools/importer-msgraph-metadata/components/parser/types.go Outdated Show resolved Hide resolved
@hashicorp hashicorp deleted a comment from github-actions bot Jun 6, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 6, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 6, 2024
@manicminer manicminer requested a review from tombuildsstuff June 6, 2024 17:41
@hashicorp hashicorp deleted a comment from github-actions bot Jun 6, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 6, 2024
@manicminer manicminer force-pushed the msgraph-importer-refactor branch from 98b1ba1 to f8f7bb6 Compare June 27, 2024 17:34
@hashicorp hashicorp deleted a comment from github-actions bot Jun 27, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 27, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 27, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 27, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 27, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 27, 2024
@manicminer manicminer force-pushed the msgraph-importer-refactor branch from f8f7bb6 to b146da6 Compare June 27, 2024 17:50
@hashicorp hashicorp deleted a comment from github-actions bot Jun 27, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 27, 2024
@hashicorp hashicorp deleted a comment from github-actions bot Jun 27, 2024
Copy link

Breaking Changes

No Breaking Changes were found 👍

Copy link

Summary of Changes

No Breaking or Non-Breaking Changes were found 👍

Copy link

New Resource ID Segments containing Static Identifiers

No new Resource ID Segments containing Static Identifiers were identified in the set of changes 🤙.

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

Left a few comments inline but 👍

Copy link

github-actions bot commented Jul 8, 2024

Breaking Changes

No Breaking Changes were found 👍

Copy link

github-actions bot commented Jul 8, 2024

Summary of Changes

No Breaking or Non-Breaking Changes were found 👍

Copy link

github-actions bot commented Jul 8, 2024

New Resource ID Segments containing Static Identifiers

No new Resource ID Segments containing Static Identifiers were identified in the set of changes 🤙.

@manicminer manicminer merged commit dbffd4d into main Jul 8, 2024
6 checks passed
@manicminer manicminer deleted the msgraph-importer-refactor branch July 8, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tool/importer-rest-api-specs Swagger Data Importer issues tool/internal-sdk Related to the internal SDK used in this repository `./tools/sdk` tool/msgraph-importer Issues related to the Microsoft Graph importer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants