-
Notifications
You must be signed in to change notification settings - Fork 341
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_selection conditions update incorrectly reports changed #1613
Comments
I intend to submit a PR for this but because describing the issue is kind of involved, I wanted to document it first rather than trying to write all the details up in the PR summary. |
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Jul 4, 2023
Document and validate backup_selection conditions suboptions SUMMARY Adds documentation and validation for all conditions suboptions in backup_selection module. Fixes #1613 Additionally fixes a bug in module_utils.backup that caused an empty list to be returned from get_selection_details() when multiple backup selections exist for a given backup plan. ISSUE TYPE Bugfix Pull Request COMPONENT NAME backup_selection module_utils.backup ADDITIONAL INFORMATION See #1613 for detailed description of related issue. Reviewed-by: Jill R Reviewed-by: Alina Buzachis
patchback bot
pushed a commit
that referenced
this issue
Jul 4, 2023
Document and validate backup_selection conditions suboptions SUMMARY Adds documentation and validation for all conditions suboptions in backup_selection module. Fixes #1613 Additionally fixes a bug in module_utils.backup that caused an empty list to be returned from get_selection_details() when multiple backup selections exist for a given backup plan. ISSUE TYPE Bugfix Pull Request COMPONENT NAME backup_selection module_utils.backup ADDITIONAL INFORMATION See #1613 for detailed description of related issue. Reviewed-by: Jill R Reviewed-by: Alina Buzachis (cherry picked from commit cfeffe6)
softwarefactory-project-zuul bot
pushed a commit
that referenced
this issue
Jul 4, 2023
…1638) [PR #1633/cfeffe66 backport][stable-6] Document and validate backup_selection conditions suboptions This is a backport of PR #1633 as merged into main (cfeffe6). SUMMARY Adds documentation and validation for all conditions suboptions in backup_selection module. Fixes #1613 Additionally fixes a bug in module_utils.backup that caused an empty list to be returned from get_selection_details() when multiple backup selections exist for a given backup plan. ISSUE TYPE Bugfix Pull Request COMPONENT NAME backup_selection module_utils.backup ADDITIONAL INFORMATION See #1613 for detailed description of related issue. Reviewed-by: Alina Buzachis
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this issue
Sep 18, 2023
…tions#1613) Fixup opensearch when using advanced security options Fix ansible-collections#1560 Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None>
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this issue
Sep 18, 2023
…tions#1613) Fixup opensearch when using advanced security options Fix ansible-collections#1560 Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None>
abikouo
pushed a commit
to abikouo/amazon.aws
that referenced
this issue
Oct 24, 2023
…tions#1613) Fixup opensearch when using advanced security options Fix ansible-collections#1560 Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When adding the
conditions
option to an idempotent backup selection update, the selection does not change but the result returns"changed": true
. This happens because a user can pass one or more of the four possibleconditions
suboptions, and any suboptions not passed will simply not exist in the module data (rather than being present with an empty orNone
value).Later, when we compare the provided
conditions
with the conditions value from the current AWS backup selection, they are never equal because the boto3 client'sget_backup_selection()
returns all condition suboptions instead of just the ones that have values. Any that do not have values are returned as empty lists, which are not present in the data provided by the user.Ultimately this still results in the backup selection update being correct, it's just the returned
changed
value that's wrong.Issue Type
Bug Report
Component Name
backup_selection
Ansible Version
Collection Versions
AWS SDK versions
Configuration
$ ansible-config dump --only-changed
OS / Environment
No response
Steps to Reproduce
This is modified from the existing integration test to include
conditions
.Expected Results
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: