diff --git a/deployment/terraform/database_anonymizer_sheduled_task/docker/database_anonymizer.py b/deployment/terraform/database_anonymizer_sheduled_task/docker/database_anonymizer.py index 623dca44c..6a7e9a99a 100755 --- a/deployment/terraform/database_anonymizer_sheduled_task/docker/database_anonymizer.py +++ b/deployment/terraform/database_anonymizer_sheduled_task/docker/database_anonymizer.py @@ -2,6 +2,7 @@ from botocore.exceptions import ClientError import pg8000.native import os +import time try: db_instance_identifier = os.environ['SOURCE_DATABASE_IDENTIFIER'] @@ -112,14 +113,19 @@ SourceRegion=aws_region ) -waiters = source.get_waiter('db_snapshot_completed') -waiters.wait( - DBSnapshotIdentifier=shared_snapshot_identifier, - WaiterConfig={ - 'Delay': 15, - 'MaxAttempts': 100 - } -) +attempt = 0 +while attempt < 300: + response = source.describe_db_snapshots(DBSnapshotIdentifier=shared_snapshot_identifier) + snapshot_status = response['DBSnapshots'][0]['Status'] + + if snapshot_status == 'available': + print(f"Snapshot {shared_snapshot_identifier} is now available.") + break + else: + print(f"Snapshot {shared_snapshot_identifier} status: {snapshot_status}. Waiting...") + + time.sleep(60) + attempt += 1 print("Share snapshot " + shared_snapshot_identifier + " with " + destination_aws_account + " AWS account") source.modify_db_snapshot_attribute( diff --git a/doc/release/RELEASE-NOTES.md b/doc/release/RELEASE-NOTES.md index 3f4097884..853b9189a 100644 --- a/doc/release/RELEASE-NOTES.md +++ b/doc/release/RELEASE-NOTES.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). The format is based on the `RELEASE-NOTES-TEMPLATE.md` file. +## Release 1.26.0 + +## Introduction +* Product name: Open Supply Hub +* Release date: December 14, 2024 + +### Database changes +#### Migrations: +* *Describe migrations here.* + +#### Scheme changes +* *Describe scheme changes here.* + +### Code/API changes +* *Describe code/API changes here.* + +### Architecture/Environment changes +* *Describe architecture/environment changes here.* + +### Bugfix +* [OSDEV-1388](https://opensupplyhub.atlassian.net/browse/OSDEV-1388) - The waiter from boto3 cannot wait more than half an hour so we replaced it with our own. + +### What's new +* *Describe what's new here. The changes that can impact user experience should be listed in this section.* + +### Release instructions: +* *Provide release instructions here.* ## Release 1.25.0