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

chore(cloud): update to queries, types to support azure monitor integration from TF #1029

Merged
merged 2 commits into from
Apr 28, 2023

Conversation

pranav-new-relic
Copy link
Member

@pranav-new-relic pranav-new-relic commented Apr 24, 2023

This PR addresses NR-110266, go-client changes to facilitate the addition of a new Azure integration azureMonitor to Terraform, and comprises the following -

  • Changes fetched from Tutone to update the schema of queries/mutations linked to cloudConfigureIntegration and its counterpart to disable cloud integrations
  • Addition of unit tests and integration tests to check if the azureMonitor integration is created/updated/deleted as expected

Integration Test Results
Unit Test Results

Note
The integration test added in this PR will probably not function (see results in Git Integration Tests) since the variables needed to link an Azure account to New Relic (i.e. Azure account credentials) are not present in the environment running these tests. However, this has been tested locally, and the following screenshots show the results.

The integration test succeeds when a valid Azure account linked to New Relic is provided.

image

The integration test fails if an invalid Azure account (that does not exist and is not linked to New Relic) is provided.

image

@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2023

Codecov Report

Merging #1029 (f6b20fc) into main (98a89a6) will increase coverage by 0.82%.
The diff coverage is n/a.

❗ Current head f6b20fc differs from pull request most recent head 6a5d639. Consider uploading reports for the commit 6a5d639 to get more accurate results

@@            Coverage Diff             @@
##             main    #1029      +/-   ##
==========================================
+ Coverage   40.79%   41.62%   +0.82%     
==========================================
  Files          79       79              
  Lines        4956     4956              
==========================================
+ Hits         2022     2063      +41     
+ Misses       2788     2745      -43     
- Partials      146      148       +2     
Flag Coverage Δ
unit 41.62% <ø> (+0.82%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/cloud/cloud_api.go 23.33% <ø> (+23.33%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pranav-new-relic pranav-new-relic force-pushed the feat/azure-monitor branch 2 times, most recently from e8a8cec to 688cee2 Compare April 26, 2023 11:01
Comment on lines -761 to -773
type CloudAwsGovcloudLinkAccountInput struct {
// The key used to make requests to AWS service APIs
AccessKeyId string `json:"accessKeyId"`
// The AWS account id
AwsAccountId string `json:"awsAccountId"`
// How metrics will be collected.
MetricCollectionMode CloudMetricCollectionMode `json:"metricCollectionMode,omitempty"`
// The linked account name.
Name string `json:"name"`
// The secret key used to make requests to AWS service APIs
SecretAccessKey SecureValue `json:"secretAccessKey"`
}

Copy link
Member Author

Choose a reason for hiding this comment

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

A note for the reviewer: changes show this type to have been deleted, as it has been replaced by CloudAwsGov**C**loudLinkAccountInput (since the C in 'Govcloud' was made a capital letter in the NerdGraph API, we see a change in the type via Tutone). Types with similar names also show similar changes in this file.

@pranav-new-relic pranav-new-relic force-pushed the feat/azure-monitor branch 2 times, most recently from 1ca227a to 8c36920 Compare April 26, 2023 15:29
@pranav-new-relic pranav-new-relic changed the title feat(cloud): update to queries, types to support azure monitor integration from TF chore(cloud): update to queries, types to support azure monitor integration from TF Apr 26, 2023
@pranav-new-relic pranav-new-relic marked this pull request as ready for review April 27, 2023 10:20
@pranav-new-relic pranav-new-relic merged commit 3d97aa8 into main Apr 28, 2023
@pranav-new-relic pranav-new-relic deleted the feat/azure-monitor branch April 28, 2023 05:05
sanderblue pushed a commit that referenced this pull request Apr 28, 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.

3 participants