Skip to content

Commit dc19d6c

Browse files
authored
chore: update documentation and clean up automations (#510)
1 parent d1dbea1 commit dc19d6c

19 files changed

+83
-67
lines changed

.github/styles/config/vocabularies/Aurora/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ autocommit
1313
hostname
1414
[Kk]eepalive
1515
[Bb]ackoff
16+
[Xx]ray
17+
[Cc]loudwatch

.github/workflows/integration_tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
matrix:
1616
python-version: [ "3.8", "3.11" ]
1717
engine_version: ["lts", "latest"]
18+
environment: ["mysql", "pg"]
1819

1920
steps:
2021
- name: 'Clone repository'
@@ -59,15 +60,13 @@ jobs:
5960
6061
- name: 'Run Integration Tests'
6162
run: |
62-
./gradlew --no-parallel --no-daemon test-python-${{ matrix.python-version }} --info
63+
./gradlew --no-parallel --no-daemon test-python-${{ matrix.python-version }}-${{ matrix.environment }} --info
6364
env:
6465
RDS_CLUSTER_DOMAIN: ${{ secrets.DB_CONN_SUFFIX }}
6566
RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
6667
AWS_ACCESS_KEY_ID: ${{ env.TEMP_AWS_ACCESS_KEY_ID }}
6768
AWS_SECRET_ACCESS_KEY: ${{ env.TEMP_AWS_SECRET_ACCESS_KEY }}
6869
AWS_SESSION_TOKEN: ${{ env.TEMP_AWS_SESSION_TOKEN }}
69-
AURORA_MYSQL_DB_ENGINE_VERSION: ${{ secrets.engine_version }}
70-
AURORA_PG_ENGINE_VERSION: ${{ matrix.engine_version }}
7170

7271
- name: 'Archive results'
7372
if: always()

.github/workflows/integration_tests_codebuild.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
matrix:
1212
python-version: [ "3.8", "3.11" ]
1313
environment: [ "mysql", "pg" ]
14-
engine_version: ["latest"]
1514

1615
runs-on: ubuntu-latest
1716
environment: ${{ matrix.environment }}_integ
@@ -67,13 +66,13 @@ jobs:
6766
AWS_SECRET_ACCESS_KEY: ${{ env.TEMP_AWS_SECRET_ACCESS_KEY }}
6867
AWS_SESSION_TOKEN: ${{ env.TEMP_AWS_SESSION_TOKEN }}
6968
RDS_ENDPOINT: ${{ secrets.RDS_ENDPOINT }}
70-
AURORA_MYSQL_DB_ENGINE_VERSION: ${{ secrets.engine_version }}
71-
AURORA_PG_ENGINE_VERSION: ${{ matrix.engine_version }}
69+
AURORA_MYSQL_DB_ENGINE_VERSION: "latest"
70+
AURORA_PG_ENGINE_VERSION: "latest"
7271

7372
- name: 'Archive results'
7473
if: always()
7574
uses: actions/upload-artifact@v3
7675
with:
77-
name: pytest-integration-report-${{ matrix.environment }}
76+
name: pytest-integration-report
7877
path: ./tests/integration/container/reports
7978
retention-days: 5

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ The following table lists the connection properties used with the AWS Advanced P
139139
### Using the AWS Advanced Python Driver
140140

141141
Technical documentation regarding the functionality of the AWS Advanced Python Driver will be maintained in this GitHub repository. Since the AWS Advanced Python Driver requires an underlying Python driver, please refer to the individual driver's documentation for driver-specific information.
142-
To find all the documentation and concrete examples on how to use the AWS Advanced Python Driver, please refer to the [AWS Advanced Python Driver Documentation](./docs/Documentation.md) page.
142+
To find all the documentation and concrete examples on how to use the AWS Advanced Python Driver, please refer to the [AWS Advanced Python Driver Documentation](./docs/README) page.
143143

144144
### Known Limitations
145145

@@ -196,6 +196,7 @@ For all other questions, please use [GitHub discussions](https://github.com/awsl
196196
3. Make any changes on your fork. Make sure you are aware of the requirements for the project (e.g. do not require Python 3.7 if we are supporting Python 3.8 and higher).
197197
4. Create a pull request from your fork.
198198
5. Pull requests need to be approved and merged by maintainers into the main branch. <br />
199+
199200
> [!NOTE]\
200201
> Before making a pull request, [run all tests](./docs/development-guide/DevelopmentGuide.md#running-the-tests) and verify everything is passing.
201202
@@ -213,7 +214,7 @@ This `aws-advanced-python-wrapper` is being tested against the following Communi
213214

214215
| Database | Versions |
215216
|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
216-
| MySQL | 8.0.32 |
217+
| MySQL | 8.3.0 |
217218
| PostgreSQL | 15.2 |
218219
| Aurora MySQL | MySQL 8.0.mysql_aurora.3.02.2 (Wire-compatible with MySQL 8.0.23 onward. For more details see [here](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraMySQLReleaseNotes/AuroraMySQL.Updates.3022.html)) |
219220
| Aurora PostgreSQL | 14.7 and 15.2 (Compatible with PostgreSQL 14.7 and 15.2, see release notes [here](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraPostgreSQLReleaseNotes/AuroraPostgreSQL.Updates.html)) |

docs/GettingStarted.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ Before using the AWS Advanced Python Driver, you must install:
99
- Your choice of underlying Python driver.
1010
- To use the wrapper with Aurora with PostgreSQL compatibility, install [Psycopg](https://github.com/psycopg/psycopg).
1111
- To use the wrapper with Aurora with MySQL compatibility, install [MySQL Connector/Python](https://github.com/mysql/mysql-connector-python).
12+
> [!NOTE]\
13+
> The driver has been verified on Psycopg 3.1.12+ and MySQL Connector/Python 8.1.0+. Compatibility with prior versions have not been tested.
1214
1315
## Obtaining the AWS Advanced Python Driver
1416

1517
You can install the AWS Advanced Python Driver and the underlying Python drivers via [pip](https://pip.pypa.io/en/stable/).
18+
The order of installation does not matter.
1619

1720
To use the AWS Advanced Python Driver with Psycopg for Aurora PostgreSQL, run:
1821

@@ -39,10 +42,23 @@ awsconn = AwsWrapperConnection.connect(
3942
Connection.connect,
4043
"host=database.cluster-xyz.us-east-1.rds.amazonaws.com dbname=db user=john password=pwd",
4144
plugins="failover",
42-
wrapper_dialect="aurora-pg",
4345
autocommit=True
4446
)
4547
```
48+
49+
Similarly, to start using the driver with MySQL Connector/Python, you need to pass the connect function to the `AwsWrapperConnection#connect` method as shown in the following example:
50+
```python
51+
awsconn = AwsWrapperConnection.connect(
52+
mysql.connector.Connect,
53+
host="database.cluster-xyz.us-east-1.rds.amazonaws.com",
54+
database="mysql",
55+
user="admin",
56+
password="pwd",
57+
plugins="failover",
58+
autocommit=True
59+
)
60+
```
61+
4662
The `AwsWrapperConnection#connect` method accepts the connection configuration through both the connection string and the keyword arguments.
4763
You can either pass the connection configuration entirely through the connection string, entirely though the keyword arguments, or through both the connection string and the keywords arguments as shown below.
4864

File renamed without changes.

docs/development-guide/Architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ During execution, plugins may utilize the plugin service to help its execution b
2323
> - plugin service
2424
> - loaded plugin classes
2525
> - Multiple Python Connection objects opened to the same database server will have separate sets of instances mentioned above.
26-
> - All plugins share the same instance of plugin service and the same instance of host list provider.
26+
> - All plugins share the same instance of plugin service and the same instance of host list provider.

docs/development-guide/DevelopmentGuide.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ You can now make changes in the repository.
1515

1616
The AWS Advanced Python Driver uses the following tests to verify its correctness:
1717

18-
| Tests | Description |
19-
|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
20-
| Unit tests | Tests for AWS Advanced Python Driver correctness. |
21-
| Failover integration tests | Driver-specific tests for different reader and writer failover workflows using the Failover Connection Plugin. |
22-
| Enhanced failure monitoring integration tests | Driver-specific tests for the enhanced failure monitoring functionality using the Host Monitoring Connection Plugin. |
23-
| AWS authentication integration tests | Driver-specific tests for AWS authentication methods with the AWS Secrets Manager Plugin or the AWS IAM Authentication Plugin. |
18+
| Tests | Description |
19+
|-----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
20+
| Unit tests | Tests for AWS Advanced Python Driver correctness. |
21+
| Failover integration tests | Driver-specific tests for different reader and writer failover workflows using the Failover Connection Plugin. |
22+
| Enhanced failure monitoring integration tests | Driver-specific tests for the enhanced failure monitoring functionality using the Host Monitoring Connection Plugin. |
23+
| AWS authentication integration tests | Driver-specific tests for AWS authentication methods with the AWS Secrets Manager Plugin or the AWS IAM Authentication Plugin. |
2424

2525
### Performance Tests
2626

2727
The AWS Advanced Python Driver has the following tests to verify its performance:
2828

29-
| Tests | Description |
30-
|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
31-
| Connection plugin manager benchmarks | The [benchmarks](../../benchmarks/README.md) subproject measures the overhead from executing Python method calls with multiple connection plugins enabled. |
32-
| Manually-triggered performance tests | The [failover plugin performance tests](../../tests/integration/container/test_failover_performance.py) and [enhanced failure monitoring performance tests](../..tests/integration/container/test_read_write_splitting_performance.py) measure the plugins' performance under different configurations |
29+
| Tests | Description |
30+
|--------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
31+
| Connection plugin manager benchmarks | The [benchmarks](../../benchmarks/README.md) subproject measures the overhead from executing Python method calls with multiple connection plugins enabled. |
32+
| Manually-triggered performance tests | The [failover plugin performance tests](../../tests/integration/container/test_failover_performance.py) and [enhanced failure monitoring performance tests](../..tests/integration/container/test_read_write_splitting_performance.py) measure the plugins' performance under different configurations |
3333

3434
### Running the Tests
3535

docs/development-guide/IntegrationTests.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ This documentation walks through the requirements and steps required to run and
1919
### Aurora Test Requirements
2020

2121
- An AWS account with:
22-
- RDS permissions
22+
- RDS permissions.
2323
- EC2 permissions so integration tests can add the current IP address in the Aurora cluster's EC2 security group.
24-
- For more information,
25-
see: [Setting Up for Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SettingUp.html).
24+
- XRay and Cloudwatch permissions for the integration tests to report telemetries.
25+
- For more information, see: [Setting Up for Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SettingUp.html).
2626

2727
## Recommendations for ease of use
2828

@@ -85,7 +85,7 @@ unset FILTER # Done testing the IAM tests, unset FILTER
8585

8686
Remote path: `/app`
8787

88-
6. Click OK, Apply, OK.
88+
4. Click OK, Apply, OK.
8989
3. At the top right of the Pycharm window, click the dropdown arrow and select your newly created debug configuration
9090
4. Click the bug symbol to start the debug configuration. Pycharm will begin listening for a debug connection
9191
5. Navigate to your Pycharm git bash terminal. In the terminal, navigate to the project root directory. Execute a gradle

docs/development-guide/PluginService.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Plugin Service
1+
# Plugin Service
22

33
<div style="center"><img src="../images/plugin_service.png" alt="diagram for the plugin service design"/></div>
44

0 commit comments

Comments
 (0)