Add AFS undelete container operation and fix ASE workload support#2
Add AFS undelete container operation and fix ASE workload support#2zubairabid with Copilot wants to merge 6 commits into
Conversation
Co-authored-by: zubairabid <26400677+zubairabid@users.noreply.github.com>
Co-authored-by: zubairabid <26400677+zubairabid@users.noreply.github.com>
zubairabid
left a comment
There was a problem hiding this comment.
@copilot add some tests for the changes
Co-authored-by: zubairabid <26400677+zubairabid@users.noreply.github.com>
Added comprehensive tests for the new functionality in commit d2cc70f: AFS Undelete Protection Test (
ASE Workload Tests (
All tests follow the existing test infrastructure and verify the new functionality works correctly across different backup scenarios. |
There was a problem hiding this comment.
@copilot for now, rewrite this entire file. Instructions:
- Ensure correctness. Logic should not change.
- Add comments explaining what each line and each function is doing.
- Rewrite function and variable names to make more sense. Some of the resources are permanently backed up, while others are registered and then unregistered. The naming should reflect this.
There was a problem hiding this comment.
I've completely rewritten the ASE test file according to your specifications in commit f292cf1. The changes include:
Enhanced Variable Naming:
- Clearly distinguished production vs registration resources (e.g.,
ase_production_vaultvsase_registration_vault) - Descriptive names indicating purpose (
primary_database_item_name,registration_vm_container_name) - Consistent naming patterns throughout
Comprehensive Documentation:
- Module-level docstring explaining the test suite purpose
- Detailed function docstrings for each test method
- Inline comments explaining every test step and validation
- Comments explaining the difference between permanent and temporary resources
Improved Function Names:
test_backup_wl_ase_container_policy_operations→test_ase_production_backup_and_policy_operationstest_bkp_res_ase→test_ase_backup_and_restore_operationstest_registration_ase_container→test_ase_container_registration_lifecycletest_conf_prot_add_del→test_ase_protection_configuration_lifecycle
The logic remains exactly the same while significantly improving readability and maintainability.
There was a problem hiding this comment.
@copilot reduce verboseness of all comments. Minimize docstring comments, it is reducing readability of code. Remove the comments that were appended to the end of the assert lines.
There was a problem hiding this comment.
Reduced verboseness of all comments in the ASE test file in commit e19af05. Removed excessive docstrings, inline comments on assert lines, and detailed setup comments while preserving the improved naming and essential logic comments for readability.
…entation Co-authored-by: zubairabid <26400677+zubairabid@users.noreply.github.com>
Co-authored-by: zubairabid <26400677+zubairabid@users.noreply.github.com>
This PR implements the missing undelete container operation for Azure File Share (AFS) and adds full support for SAP ASE workloads in undelete and disable protection operations.
Problem
The backup module was missing critical functionality:
AFS undelete container: While Azure VM and Azure Workload backup types supported undelete operations, Azure File Share (AzureStorage) did not have this capability.
Incomplete ASE workload support: SAP ASE databases were not fully supported for:
Solution
AFS Undelete Container Support
Added
undelete_protection()function incustom_afs.pythat:AzureFileshareProtectedItemwith appropriate undelete settingsis_rehydrate = Trueto mark the item for rehydrationProtectionState.protection_stoppedfor proper state managementUpdated the dispatch logic in
custom_base.pyto routeazurestoragebackup management type to the new AFS handler.Complete ASE Workload Support
Extended validation in
custom_wl.pyto include SAP ASE databases:undelete_protection()to acceptSAPAseDatabaseitems using existingis_sapase()helperdisable_protection()to support retain data functionality for ASE workloadsComprehensive Test Coverage
Added thorough test coverage for all new functionality:
Usage
The following commands are now fully supported:
Implementation Details
The implementation seamlessly integrates with the existing backup module infrastructure while providing the missing functionality for both AFS and ASE workload scenarios.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.