-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Powershell Refresh for Dynatrace API version 2024-04-24 #28829
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
base: main
Are you sure you want to change the base?
Conversation
| Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
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.
Pull Request Overview
This pull request refreshes the DynatraceObservability module to use API version 2024-04-24, updating from the previous 2023-04-27 version. The update includes regenerated test files, test recordings, and documentation.
Key changes:
- Updated API version from 2023-04-27 to 2024-04-24 throughout test recordings and generated code
- Added new test files for previously untested cmdlets (Update-AzDynatraceMonitorPlan, Remove-AzDynatraceMonitoredSubscription, New-AzDynatraceMonitoredSubscription, Get-AzDynatraceMonitoredSubscription, Invoke-AzDynatraceManageMonitorAgentInstallation)
- Refreshed all test recordings with new subscription IDs, resource groups, and monitor names
- Minor documentation updates (corrected path references from backslashes to forward slashes)
Reviewed Changes
Copilot reviewed 65 out of 68 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/DynatraceObservability/DynatraceObservability.Autorest/test/env.json | Updated test environment with new subscription ID, tenant ID, and resource names |
| src/DynatraceObservability/DynatraceObservability.Autorest/test/Update-AzDynatraceMonitorSSOConfig.Tests.ps1 | Added actual test implementation replacing placeholder skipped tests |
| src/DynatraceObservability/DynatraceObservability.Autorest/test/Update-AzDynatraceMonitorSSOConfig.Recording.json | New test recording file for SSO config update tests |
| src/DynatraceObservability/DynatraceObservability.Autorest/test/Update-AzDynatraceMonitorPlan.Tests.ps1 | New test file with placeholder skipped tests |
| src/DynatraceObservability/DynatraceObservability.Autorest/test/*.Recording.json | Updated all test recordings to use new API version 2024-04-24 |
| src/DynatraceObservability/DynatraceObservability.Autorest/test/README.md | Corrected path reference from ..\ custom to ../custom |
| src/DynatraceObservability/DynatraceObservability.Autorest/test/Remove-AzDynatraceMonitoredSubscription.Tests.ps1 | New comprehensive test suite for delete operations |
| src/DynatraceObservability/DynatraceObservability.Autorest/test/New-AzDynatraceMonitoredSubscription.Tests.ps1 | New parameter validation test suite |
| src/DynatraceObservability/DynatraceObservability.Autorest/test/Invoke-AzDynatraceManageMonitorAgentInstallation.Tests.ps1 | New comprehensive test suite for agent installation management |
| src/DynatraceObservability/DynatraceObservability.Autorest/test/Get-AzDynatraceMonitoredSubscription.Tests.ps1 | New test file for Get operations |
| src/DynatraceObservability/DynatraceObservability.Autorest/resources/README.md | Corrected path reference from ..\custom to ../custom |
| src/DynatraceObservability/DynatraceObservability.Autorest/generate-info.json | Removed generate_Id tracking file |
| src/DynatraceObservability/DynatraceObservability.Autorest/examples/Update-AzDynatraceMonitorPlan.md | New example documentation template |
| src/DynatraceObservability/DynatraceObservability.Autorest/docs/Remove-AzDynatraceMonitorTagRule.md | Added UUID requirement note for SubscriptionId parameter |
| # Fallbacks: always supply workable defaults if values remain empty after env load | ||
| if ([string]::IsNullOrWhiteSpace($MonitorName)) { | ||
| if ($env.dynatraceName01) { $MonitorName = $env.dynatraceName01 } else { $MonitorName = "dynatrace-monitor-" + (Get-Random) } | ||
| } | ||
| if ([string]::IsNullOrWhiteSpace($ResourceGroupName)) { | ||
| if ($env.resourceGroup) { $ResourceGroupName = $env.resourceGroup } else { $ResourceGroupName = "rg-dynatrace-test" } | ||
| } |
Copilot
AI
Nov 11, 2025
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.
Inconsistent indentation: The fallback code block (lines 16-22) uses excessive indentation (4 spaces instead of the standard pattern). This should align with the rest of the file's indentation style. The comment and if-blocks should start at the same indentation level as the . ($mockingPath | Select-Object -First 1).FullName line above.
| # Fallbacks: ensure required names exist to avoid empty string binding errors | ||
| if ([string]::IsNullOrWhiteSpace($MonitorName)) { | ||
| if ($env.dynatraceName01) { $MonitorName = $env.dynatraceName01 } else { $MonitorName = 'dynatrace-monitor-' + (Get-Random) } | ||
| } | ||
| if ([string]::IsNullOrWhiteSpace($ResourceGroupName)) { | ||
| if ($env.resourceGroup) { $ResourceGroupName = $env.resourceGroup } else { $ResourceGroupName = 'rg-dynatrace-test' } | ||
| } |
Copilot
AI
Nov 11, 2025
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.
Inconsistent indentation: The fallback code block uses excessive indentation (4 spaces). This should align with the rest of the file's indentation style, matching the pattern seen in other files.
| # Fallbacks for missing names to avoid empty string parameter binding errors | ||
| if ([string]::IsNullOrWhiteSpace($MonitorName)) { | ||
| if ($env.dynatraceName01) { $MonitorName = $env.dynatraceName01 } else { $MonitorName = 'dynatrace-monitor-' + (Get-Random) } | ||
| } | ||
| if ([string]::IsNullOrWhiteSpace($ResourceGroupName)) { | ||
| if ($env.resourceGroup) { $ResourceGroupName = $env.resourceGroup } else { $ResourceGroupName = 'rg-dynatrace-test' } | ||
| } |
Copilot
AI
Nov 11, 2025
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.
Inconsistent indentation: The fallback code block uses excessive indentation (4 spaces). This should align with the rest of the file's indentation style, matching the pattern seen in other files.
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.mdand reviewed the following information:ChangeLog.mdfile(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.## Upcoming Releaseheader in the past tense.ChangeLog.mdif no new release is required, such as fixing test case only.