-
Notifications
You must be signed in to change notification settings - Fork 55
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
Conversation
672c15c
to
cd22508
Compare
…services, version, resources and operations
… for select services; bodge the models/constants by duplicating them across resources for now
…ersisting common types
cd22508
to
745ad67
Compare
There was a problem hiding this 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:
- 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 threadingRemoveService
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? - As discussed offline, can we introduce specific Stages for the
CommonTypesConstantStage
andCommonTypesModelsStage
? Whilst these'll likely be similar to the existingConstant
andModels
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/importer-msgraph-metadata/internal/pipeline/task_translate_service.go
Show resolved
Hide resolved
…r `SaveCommonTypes` to use its own stages
…ld type is unknown
…es rather than models
… we will instead use built-in types
…or better Go package/module compatibility and improved usability
98b1ba1
to
f8f7bb6
Compare
f8f7bb6
to
b146da6
Compare
Breaking ChangesNo Breaking Changes were found 👍 |
Summary of ChangesNo Breaking or Non-Breaking Changes were found 👍 |
New Resource ID Segments containing Static IdentifiersNo new Resource ID Segments containing Static Identifiers were identified in the set of changes 🤙. |
There was a problem hiding this 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 👍
tools/importer-msgraph-metadata/components/normalize/duplicates.go
Outdated
Show resolved
Hide resolved
tools/importer-msgraph-metadata/internal/pipeline/task_translate_service.go
Outdated
Show resolved
Hide resolved
tools/importer-msgraph-metadata/internal/pipeline/task_translate_service.go
Show resolved
Hide resolved
tools/importer-msgraph-metadata/internal/pipeline/task_translate_service.go
Show resolved
Hide resolved
Breaking ChangesNo Breaking Changes were found 👍 |
Summary of ChangesNo Breaking or Non-Breaking Changes were found 👍 |
New Resource ID Segments containing Static IdentifiersNo new Resource ID Segments containing Static Identifiers were identified in the set of changes 🤙. |
Changes to Data API will be added in a separate PR- this has been implemented in #4217Currently this should have no net effect on data definitions for Resource Manager.