Refactor Azure diagnostic log retrieval and improve error handling#25018
Open
mpagot wants to merge 1 commit intoos-autoinst:masterfrom
Open
Refactor Azure diagnostic log retrieval and improve error handling#25018mpagot wants to merge 1 commit intoos-autoinst:masterfrom
mpagot wants to merge 1 commit intoos-autoinst:masterfrom
Conversation
lpalovsky
approved these changes
Mar 19, 2026
t/15_qesap_azure.t
Outdated
| my @log_files = qesap_az_diagnostic_log(); | ||
|
|
||
| ok((any { $_->{resource_group} eq 'DENTIST' } @calls), 'Proper resource group in vm list'); | ||
| #ok((any { $_->{query} =~ /id:id,name:name/ } @calls), 'Proper query in vm list'); |
Contributor
There was a problem hiding this comment.
Is the commented code still needed?
b6aa545 to
4a5470e
Compare
Centralize the logic for fetching Azure VM boot diagnostics in azure_cli.pm by enhancing az_vm_diagnostic_log_get with timeout support and better error reporting. Refactor qesap_az_diagnostic_log to use this centralized function, reducing code duplication. Update unit tests in 15_qesap_azure.t and 21_sles4sap_azure_cli.t to reflect these changes and cover new failure scenarios.
4a5470e to
e0d3a3f
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.
Centralize the logic for fetching Azure VM boot diagnostics in azure_cli.pm
by enhancing az_vm_diagnostic_log_get with timeout support and
better error reporting.
Refactor qesap_az_diagnostic_log to use this centralized function,
reducing code duplication.
Update unit tests in 15_qesap_azure.t and 21_sles4sap_azure_cli.t
to reflect these changes and cover new failure scenarios.
Verification run:
qesap regression
sle-15-SP7-Qesap-Azure-Byos-x86_64-BuildLATEST_AZURE_SLE15_7
Old az cli
Simulate failure in terraform
az diagnosticis not called at allpubliccloud_tools_azure_cli_2.84.0_18032026.qcow2
publiccloud_tools_azure_cli_2.82.0_18032026.qcow2
publiccloud_tools_azure_cli_2.80.0_18032026.qcow2
sle-12-SP5-Qesap-Azure-Byos-x86_64-BuildLATEST_AZURE_SLE12_5
Old az cli
-> http://openqaworker15.qe.prg2.suse.org/tests/360093
sle-12-SP5-Qesap-Azure-Payg-x86_64-BuildLATEST_AZURE_SLE12_5
Old az cli
-> http://openqaworker15.qe.prg2.suse.org/tests/360094
hanasr
sle-15-SP4-HanaSr-Azure-Byos-x86_64-Build15-SP4_2026
Simulate Ansible failure
-> http://openqaworker15.qe.prg2.suse.org/tests/360099
publiccloud_tools_azure_cli_2.84.0_18032026.qcow2
publiccloud_tools_azure_cli_2.82.0_18032026.qcow2
publiccloud_tools_azure_cli_2.80.0_18032026.qcow2
ipaddr2
sle-15-SP5-SapCloud-Azure-Payg-x86_64-BuildLATEST_AZURE_SLE15_5-ipaddr2_azure_test
publiccloud_tools_azure_cli_2.80.0_18032026.qcow2
There is also a post fail hook failure that result in some leftovers
publiccloud_tools_azure_cli_2.82.0_18032026.qcow2
publiccloud_tools_azure_cli_2.84.0_18032026.qcow2