Integration test: add log-level control for all-types run and switch default region to centralus#73
Closed
EMaher wants to merge 1 commit into
Closed
Conversation
9ddd52d to
efe1b74
Compare
petehauge
reviewed
May 21, 2026
Collaborator
There was a problem hiding this comment.
Should this log file be included in the PR?
Agent-Logs-Url: https://github.com/Azure/apiops-cli/sessions/08964b6c-4c8a-4dda-bcb9-17322e0e16bb Co-authored-by: EMaher <9244742+EMaher@users.noreply.github.com>
a14e834 to
525913a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to the integration test infrastructure, focusing on enhanced logging, improved security through sensitive data masking, and better deployment reliability for Azure API Management (APIM) resources. The changes add log level controls, ensure sensitive values are masked in logs and outputs, provide more robust error reporting, and automate additional steps for APIM Classic SKUs. Additionally, new helper modules are introduced, and existing scripts are refactored for clarity and maintainability.
Key changes include:
Logging and Security Enhancements
log_levelinput to the GitHub Actions workflow (integration-test.yml) and corresponding support in deployment scripts, allowing Info, Verbose, or Debug output for easier troubleshooting and more granular logging. The default region was also updated tocentralus. [1] [2] [3] [4] [5] [6]Deployment Reliability and Automation
DeploymentHelpers.psm1, providingWrite-DeploymentFailureDetailsfor detailed error reporting andWait-ApimActivationto ensure APIM is fully provisioned before proceeding. These are used in both source and target APIM deployment scripts for more robust automation and diagnostics. [1] [2] [3]policyRestrictionfor Classic SKUs (Developer, Premium) after deployment, ensuring the environment matches expected test requirements.New and Refactored Scripts
Deploy-TargetApim.ps1for deploying the target APIM instance, following the same best practices as the source deployment script: parameter validation, log level control, and sensitive data masking.Microsoft.AlertsManagementto the list of required resource providers for APIM deployments, improving compatibility with newer features.Documentation and Learnings
.squad/agents/securityexpert/history.mdand.squad/agents/testengineer/history.mdwith new learnings about PowerShell logging, Azure async-operation masking, and technical gotchas for future development. [1] [2]policyRestrictions.scopegrammar and validation to.squad/agents/apimexpert/history.md.These improvements collectively make the integration test infrastructure more secure, maintainable, and developer-friendly, while also providing a better foundation for debugging and future enhancements.The all-types integration run was failing in Premium validation scenarios, and the workflow needed better diagnostics plus a region default aligned with SKU availability. This updates the integration workflow/script contract to support explicit log verbosity and sets region defaults to
centralus.Workflow contract updates (
.github/workflows/integration-test.yml)log_levelinput (Info / Verbose / Debug), defaulting toVerbose.log_levelthrough torun-roundtrip-test.ps1.locationfromeastus2tocentralusfor bothworkflow_dispatchandworkflow_call.log_levelvalues early.All-types orchestrator updates (
tests/integration/all-resource-types/run-roundtrip-test.ps1)LogLevelparameter withValidateSet('Info','Verbose','Debug'), defaultVerbose.$VerbosePreference/$DebugPreference.Deploy-SourceApim.ps1, artifact validation, APIM compare) so diagnostics are consistent across phases.Docs alignment (
tests/integration/all-resource-types/README.md)centralus.