-
Notifications
You must be signed in to change notification settings - Fork 346
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
Backup plan params bugfix #1611
Backup plan params bugfix #1611
Conversation
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 08s |
changelogs/fragments/202306012-backup_plan-remove-none-from-nested-params.yml
Outdated
Show resolved
Hide resolved
…sted-params.yml Co-authored-by: Alina Buzachis <[email protected]>
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 12s |
Build failed. ✔️ ansible-galaxy-importer SUCCESS in 4m 03s |
fc0a06d
to
e391547
Compare
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 54s |
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 4m 32s |
Backport to stable-6: 💚 backport PR created✅ Backport PR branch: Backported as #1620 🤖 @patchback |
Backup plan params bugfix SUMMARY This updates the backup_plan module to remove all None values from nested dicts in supplied params. Previously nested None values were retained and caused errors when sent through to the boto3 client calls. ISSUE TYPE Bugfix Pull Request COMPONENT NAME backup_plan ADDITIONAL INFORMATION Creating or updating a plan without providing an optional value in a nested dict would result in that value being set to None, and it wasn't being removed. For example: - name: Update Backup plan amazon.aws.backup_plan: backup_plan_name: my-backup-plan rules: - rule_name: my-rule target_backup_vault_name: my-vault schedule_expression: "cron(0 * ? * * *)" lifecycle: move_to_cold_storage_after_days: 30 The optional lifecycle.delete_after_days option in the above example would be set to None by default, and the removal of None values wasn't recursively going through the entire dict. This is now fixed and the above example will work. Reviewed-by: Alina Buzachis Reviewed-by: Helen Bailey <[email protected]> Reviewed-by: Bikouo Aubin (cherry picked from commit ad953e8)
Backup plan params bugfix SUMMARY This updates the backup_plan module to remove all None values from nested dicts in supplied params. Previously nested None values were retained and caused errors when sent through to the boto3 client calls. ISSUE TYPE Bugfix Pull Request COMPONENT NAME backup_plan ADDITIONAL INFORMATION Creating or updating a plan without providing an optional value in a nested dict would result in that value being set to None, and it wasn't being removed. For example: - name: Update Backup plan amazon.aws.backup_plan: backup_plan_name: my-backup-plan rules: - rule_name: my-rule target_backup_vault_name: my-vault schedule_expression: "cron(0 * ? * * *)" lifecycle: move_to_cold_storage_after_days: 30 The optional lifecycle.delete_after_days option in the above example would be set to None by default, and the removal of None values wasn't recursively going through the entire dict. This is now fixed and the above example will work. Reviewed-by: Alina Buzachis Reviewed-by: Helen Bailey <[email protected]> Reviewed-by: Bikouo Aubin (cherry picked from commit ad953e8)
[PR #1611/ad953e83 backport][stable-6] Backup plan params bugfix This is a backport of PR #1611 as merged into main (ad953e8). SUMMARY This updates the backup_plan module to remove all None values from nested dicts in supplied params. Previously nested None values were retained and caused errors when sent through to the boto3 client calls. ISSUE TYPE Bugfix Pull Request COMPONENT NAME backup_plan ADDITIONAL INFORMATION Creating or updating a plan without providing an optional value in a nested dict would result in that value being set to None, and it wasn't being removed. For example: - name: Update Backup plan amazon.aws.backup_plan: backup_plan_name: my-backup-plan rules: - rule_name: my-rule target_backup_vault_name: my-vault schedule_expression: "cron(0 * ? * * *)" lifecycle: move_to_cold_storage_after_days: 30 The optional lifecycle.delete_after_days option in the above example would be set to None by default, and the removal of None values wasn't recursively going through the entire dict. This is now fixed and the above example will work. Reviewed-by: Alina Buzachis
SUMMARY
This updates the
backup_plan
module to remove allNone
values from nested dicts in supplied params. Previously nestedNone
values were retained and caused errors when sent through to the boto3 client calls.ISSUE TYPE
COMPONENT NAME
backup_plan
ADDITIONAL INFORMATION
Creating or updating a plan without providing an optional value in a nested dict would result in that value being set to
None
, and it wasn't being removed. For example:The optional
lifecycle.delete_after_days
option in the above example would be set toNone
by default, and the removal ofNone
values wasn't recursively going through the entire dict. This is now fixed and the above example will work.