Skip to content

[Modules] Updated Insight DiagnosticSettings to new dependencies approach#2106

Merged
AlexanderSehr merged 9 commits intomainfrom
users/alsehr/1791_Insights_diagnosticSettings
Oct 4, 2022
Merged

[Modules] Updated Insight DiagnosticSettings to new dependencies approach#2106
AlexanderSehr merged 9 commits intomainfrom
users/alsehr/1791_Insights_diagnosticSettings

Conversation

@AlexanderSehr
Copy link
Copy Markdown
Contributor

Description

  • Updated Insight DiagnosticSettings to new dependencies approach
  • Added Set-ModuleReadMe capabiltity to deal with empty bicep parameters
  • Enhanced robustness of validation script

Pipeline references

For module/pipeline changes, please create and attach the status badge of your successful run.

Pipeline
Insights: DiagnosticSettings

Type of Change

Please delete options that are not relevant.

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Update to documentation

@AlexanderSehr AlexanderSehr requested a review from a team as a code owner September 21, 2022 20:13
@AlexanderSehr AlexanderSehr self-assigned this Sep 21, 2022
@AlexanderSehr AlexanderSehr linked an issue Sep 21, 2022 that may be closed by this pull request
@AlexanderSehr AlexanderSehr added [cat] modules category: modules [cat] testing category: testing labels Sep 21, 2022
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 21, 2022

Unit Test Results

47 tests  +25   46 ✔️ +25   26s ⏱️ -1s
  1 suites ±  0     1 💤 ±  0 
  1 files   ±  0     0 ±  0 

Results for commit 0719343. ± Comparison against base commit b1101a2.

This pull request removes 22 and adds 47 tests. Note that renamed tests count towards both.
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ File/folder tests..test folder.[Microsoft.Network/connections] *parameters.json files in the .test folder should be valid json
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ File/folder tests..test folder.[Microsoft.Network/connections] folder should contain one or more *parameters.json files
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ File/folder tests.General module folder tests.[Microsoft.Network/connections] Module should contain a [.test] folder
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ File/folder tests.General module folder tests.[Microsoft.Network/connections] Module should contain a [deploy.json/deploy.bicep] file
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ File/folder tests.General module folder tests.[Microsoft.Network/connections] Module should contain a [readme.md] file
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ File/folder tests.General module folder tests.[Microsoft.Network/connections] Module should contain a [version.json] file
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ File/folder tests.General module folder tests.[Microsoft.Network/connections] Module should have a GitHub workflow
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ File/folder tests.General module folder tests.[Microsoft.Network/connections] Module should have an Azure DevOps pipeline
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Parameter file tests.Deployment test file tests.[Microsoft.Network/connections] Bicep test deployment files should invoke test like [module testDeployment '../.*deploy.bicep' = {]
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Parameter file tests.Deployment test file tests.[Microsoft.Network/connections] Bicep test deployment name should contain [-test-]
…
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ API version tests [All apiVersions in the template should be 'recent'].In [Microsoft.Insights/diagnosticSettings] used resource type [diagnosticsettings] should use one of the recent API version(s). Currently using [2021-05-01-preview]
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Deployment template tests.Deployment template tests.[Microsoft.Insights/diagnosticSettings] All apiVersion properties should be set to a static, hard-coded value
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Deployment template tests.Deployment template tests.[Microsoft.Insights/diagnosticSettings] All non-required parameters in template file should not have description that start with "Required."
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Deployment template tests.Deployment template tests.[Microsoft.Insights/diagnosticSettings] All parameters in parameters files exist in template file (deploy.json)
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Deployment template tests.Deployment template tests.[Microsoft.Insights/diagnosticSettings] All required parameters in template file (deploy.json) should exist in parameters files
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Deployment template tests.Deployment template tests.[Microsoft.Insights/diagnosticSettings] CUA ID deployment should be present in the template
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Deployment template tests.Deployment template tests.[Microsoft.Insights/diagnosticSettings] Conditional parameters' description should contain 'Required if' followed by the condition making the parameter required.
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Deployment template tests.Deployment template tests.[Microsoft.Insights/diagnosticSettings] If delete lock is implemented, the template should have a lock parameter with the default value of ['']
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Deployment template tests.Deployment template tests.[Microsoft.Insights/diagnosticSettings] Location output should be returned for resources that use it
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ Deployment template tests.Deployment template tests.[Microsoft.Insights/diagnosticSettings] Output names should be camel-cased (no dashes or underscores and must start with lower-case letter)
…
This pull request removes 1 skipped test and adds 1 skipped test. Note that renamed tests count towards both.
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ File/folder tests..test folder.[Microsoft.Network/connections] *parameters.json files in the .test folder should be valid json
/home/runner/work/ResourceModules/ResourceModules/utilities/pipelines/staticValidation/module.tests.ps1 ‑ File/folder tests..test folder.[Microsoft.Insights/diagnosticSettings] *parameters.json files in the .test folder should be valid json

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

@eriqua eriqua left a comment

Choose a reason for hiding this comment

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

It looks like the min deployment test causes the deployment to hang. I'd suggest to remove the min test it from this PR and open a separate issue to investigate that. Mostly because it could be that required parameters, and so the module, need to be updated.

@eriqua eriqua added the [prio] high importance of the issue: high priority label Oct 2, 2022
@AlexanderSehr AlexanderSehr enabled auto-merge (squash) October 3, 2022 20:12
AlexanderSehr and others added 3 commits October 4, 2022 19:10
…loy.test.bicep

Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
…loy.test.bicep

Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
…loy.test.bicep

Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@eriqua eriqua left a comment

Choose a reason for hiding this comment

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

🆗

@AlexanderSehr AlexanderSehr merged commit 4d2c6d9 into main Oct 4, 2022
@AlexanderSehr AlexanderSehr deleted the users/alsehr/1791_Insights_diagnosticSettings branch October 4, 2022 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[cat] modules category: modules [cat] testing category: testing [prio] high importance of the issue: high priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Insights/diagnosticSettings to new dependencies approach

2 participants