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

importer-rest-api-specs - data workaround for AlertsManagement and move call to removeUnusedItems #4020

Merged
merged 3 commits into from
Apr 2, 2024

Conversation

stephybun
Copy link
Member

@stephybun stephybun commented Mar 28, 2024

This PR

  • Adds a data workaround for the ActionRules resource in AlertsManagement which will allow us to remove AlertsManagement entirely from the provider
  • Moves where we call removeUnusedItems, this was previously called everytime we parsed data associated with a swagger tag, but this results in the removal of models that might need to referenced in data workarounds.
  • removeUnusedItems is now called after all the processing has been done for a service
  • Refactors removeUnusedItems to take separate constants and models argument instead of a result argument of type ParseResult
  • Calls removeUnusedItems in the test helper used for parsing the testdata since it's no longer called iteratively in the parse function that we're testing. We still need to replicate the whole parsing process for these tests to be able to ensure the behaviour we're expecting is maintained

The effects of this on the existing API definitions is minimal, all of the changes listed below will not affect any resources in the provider

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    api-definitions/resource-manager/DataFactory/2018-06-01/DataFlowDebugSession/Constant-IntegrationRuntimeReferenceType.json
        deleted:    api-definitions/resource-manager/DataFactory/2018-06-01/DataFlows/Model-PowerQuerySink.json
        deleted:    api-definitions/resource-manager/DataFactory/2018-06-01/Pipelines/Model-DataFlowSink.json
        deleted:    api-definitions/resource-manager/DataMigration/2021-06-30/Commons/Model-MongoDbConnectionInfo.json

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        api-definitions/resource-manager/AlertsManagement/2019-05-05-preview/ActionRules/Constant-SuppressionType.json
        api-definitions/resource-manager/AlertsManagement/2019-05-05-preview/ActionRules/Model-ActionGroup.json
        api-definitions/resource-manager/AlertsManagement/2019-05-05-preview/ActionRules/Model-Diagnostics.json
        api-definitions/resource-manager/AlertsManagement/2019-05-05-preview/ActionRules/Model-Suppression.json
        api-definitions/resource-manager/AlertsManagement/2019-05-05-preview/ActionRules/Model-SuppressionConfig.json
        api-definitions/resource-manager/AlertsManagement/2019-05-05-preview/ActionRules/Model-SuppressionSchedule.json

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.

A few minor things but otherwise 👍

@stephybun stephybun merged commit 6580978 into main Apr 2, 2024
2 checks passed
@stephybun stephybun deleted the f/data-workaround-alertsmanagement branch April 2, 2024 07:01
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.

2 participants