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

Fix test failures in deploy_flask_app and backup_select_resources roles #112

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/backup_select_resource_bug_fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
bugfixes:
- Fix incorrect dict attribute in backup_select_resources role.
3 changes: 3 additions & 0 deletions changelogs/fragments/fix_rds_db_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- Replace the postgres db engine version from 14.8 to 16.2
2 changes: 1 addition & 1 deletion playbooks/webapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ To delete the webapp:
* **rds_instance_class** (str): DB instance class for the RDS instance. Default: `db.m6g.large`
* **rds_instance_name** (str): Name for the database. Default: `mysampledb123`
* **rds_engine** (str): Engine to use for the database. Default: `postgres`
* **rds_engine_version** (str): Version number of the database engine to use. Default: `"14.8"`
* **rds_engine_version** (str): Version number of the database engine to use. Default: `"16.2"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change a breaking_change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fail to see why this modification would constitute a breaking change. AWS has eliminated the 14.8 version. Users can still specify the desired version number as they did previously. If not specified, the default value will now be 16.2 instead of 14.8. This adjustment should have no impact on users of this role. Does this make sense to you?

* **deploy_flask_app_rds_master_username** (str): Name of the master user for the database instance. Default: `ansible`
* **deploy_flask_app_rds_master_password** (str): Password for the master database user. Default: `L#5cH2mgy_`

Expand Down
2 changes: 1 addition & 1 deletion playbooks/webapp/vars/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ rds_allocated_storage_gb: 20
rds_instance_class: db.m6g.large
rds_instance_name: mysampledb123
rds_engine: postgres
rds_engine_version: "14.8"
rds_engine_version: "16.2"
bastion_host_type: t3.micro
bastion_host_venv_path: ~/env
rds_listening_port: 5432
Expand Down
2 changes: 1 addition & 1 deletion roles/backup_select_resources/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

- name: Set backup role ARN
ansible.builtin.set_fact:
backup_select_resources_backup_role_arn: "{{ backup_select_resources_role_info.iam_roles[0].arn if backup_select_resources_new_role_info is skipped else backup_select_resources_new_role_info.arn }}"
backup_select_resources_backup_role_arn: "{{ backup_select_resources_role_info.iam_roles[0].arn if backup_select_resources_new_role_info is skipped else backup_select_resources_new_role_info.iam_role.arn }}"

- name: Create or update backup selection
amazon.aws.backup_selection:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
- "{{ secgroup.group_id }}"
user_data: |
#!/bin/bash
yum install -y python3 python-virtualenv sshpass netcat ansible
yum install -y python3 python3-virtualenv sshpass netcat ansible-core
wait: true
state: started
register: vm_result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ rds_allocated_storage_gb: 20
rds_instance_class: db.m6g.large
rds_instance_name: mysampledb123
rds_engine: postgres
rds_engine_version: "14.8"
rds_engine_version: "16.2"
bastion_host_type: t3.micro
bastion_host_venv_path: ~/env
image_filter: Fedora-Cloud-Base-38-*
image_filter: Fedora-Cloud-Base-39-*
bastion_host_iam_role: "{{ resource_prefix }}-role"

# vars for the deploy_flask_app role and create task
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/targets/test_deploy_flask_app/runme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ trap 'cleanup "${@}"' ERR
ansible-playbook run.yaml -e "run_deploy_flask_app_operation=create" "$@"

# Delete web application
ansible-playbook run.yaml -e "run_deploy_flask_app_operation=delete" "$@"
ansible-playbook run.yaml -e "run_deploy_flask_app_operation=delete" "$@"
Loading