Skip to content
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

Idempotence fails with backup_plan on botocore >= 1.31.36 #1952

Closed
1 task done
gravesm opened this issue Jan 15, 2024 · 0 comments · Fixed by #1961
Closed
1 task done

Idempotence fails with backup_plan on botocore >= 1.31.36 #1952

gravesm opened this issue Jan 15, 2024 · 0 comments · Fixed by #1961
Labels

Comments

@gravesm
Copy link
Member

gravesm commented Jan 15, 2024

Summary

The backup_plan module is not idempotent on botocore >= 1.31.36. This is because timezone customization support was added for rules (https://github.com/boto/boto3/blob/86426e872033d2d03e083fa53848e53d099ebcde/CHANGELOG.rst#L1112). The ScheduleExpressionTimezone field is always returned when describing a backup plan and defaults to Etc/UTC.

Issue Type

Bug Report

Component Name

backup_plan

Ansible Version

$ ansible --version
ansible [core 2.17.0.dev0] (milestone 5812cabaf5) last updated 2023/11/29 15:10:13 (GMT -400)
  config file = None
  configured module search path = ['/home/mgraves/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/mgraves/git/ansible/lib/ansible
  ansible collection location = /home/mgraves/git:/home/mgraves/.ansible/collections
  executable location = /home/mgraves/git/ansible/bin/ansible
  python version = 3.10.2 (main, Feb 22 2022, 13:57:33) [GCC 10.2.1 20210110] (/home/mgraves/git/ansible/venv-3.10/bin/python)
  jinja version = 3.1.2
  libyaml = True

Collection Versions

$ ansible-galaxy collection list
amazon.aws                8.0.0-dev0

AWS SDK versions

$ pip show boto boto3 botocore
Name: boto3
Version: 1.28.35
Summary: The AWS SDK for Python
Home-page: https://github.com/boto/boto3
Author: Amazon Web Services
Author-email: 
License: Apache License 2.0
Location: /home/mgraves/git/ansible/venv-3.10/lib/python3.10/site-packages
Requires: botocore, jmespath, s3transfer
Required-by: 
---
Name: botocore
Version: 1.31.36
Summary: Low-level, data-driven core of boto 3.
Home-page: https://github.com/boto/botocore
Author: Amazon Web Services
Author-email: 
License: Apache License 2.0
Location: /home/mgraves/git/ansible/venv-3.10/lib/python3.10/site-packages
Requires: jmespath, python-dateutil, urllib3
Required-by: boto3, s3transfer

Configuration

No response

OS / Environment

No response

Steps to Reproduce

- hosts: localhost
  gather_facts: false
  vars:
    backup_vault_name: "mgraves-test-backup-vault"
    backup_plan_name: "mgraves-test-backup-plan"
  tasks:
    - name: Create a backup vault for the plan to target
      amazon.aws.backup_vault:
        backup_vault_name: "{{ backup_vault_name }}"

    - name: Create a backup plan
      amazon.aws.backup_plan:
        backup_plan_name: "{{ backup_plan_name }}"
        rules:
          - rule_name: daily
            target_backup_vault_name: "{{ backup_vault_name }}"
        tags:
          Environment: Test

    - name: Create the same backup plan
      amazon.aws.backup_plan:
        backup_plan_name: "{{ backup_plan_name }}"
        rules:
          - rule_name: daily
            target_backup_vault_name: "{{ backup_vault_name }}"
        tags:
          Environment: Test

Expected Results

The second task creating a backup plan should not show changed.

Actual Results

The second task creating a backup plan shows that it changed.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@gravesm gravesm added jira and removed needs_triage labels Jan 16, 2024
softwarefactory-project-zuul bot pushed a commit that referenced this issue Feb 5, 2024
backup_plan - fix idempotency issue with botocore >= 1.31.36

SUMMARY

Fixes #1952
backup_plan - fix idempotency issue with botocore >= 1.31.36

ISSUE TYPE


Bugfix Pull Request
Feature Pull Request

Reviewed-by: Mark Chappell
patchback bot pushed a commit that referenced this issue Feb 5, 2024
backup_plan - fix idempotency issue with botocore >= 1.31.36

SUMMARY

Fixes #1952
backup_plan - fix idempotency issue with botocore >= 1.31.36

ISSUE TYPE

Bugfix Pull Request
Feature Pull Request

Reviewed-by: Mark Chappell
(cherry picked from commit c8064d5)
softwarefactory-project-zuul bot pushed a commit that referenced this issue Feb 5, 2024
…1962)

[PR #1961/c8064d5c backport][stable-7] backup_plan - fix idempotency issue with botocore >= 1.31.36

This is a backport of PR #1961 as merged into main (c8064d5).
SUMMARY

Fixes #1952
backup_plan - fix idempotency issue with botocore >= 1.31.36

ISSUE TYPE


Bugfix Pull Request
Feature Pull Request

Reviewed-by: Alina Buzachis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant