Skip to content
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
77 changes: 77 additions & 0 deletions .github/workflows/blue_green_integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: Blue/Green Integration Tests

on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.jpg'
- '**/README.txt'
- '**/LICENSE.txt'
- 'docs/**'
- 'ISSUE_TEMPLATE/**'
- '**/remove-old-artifacts.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

jobs:
blue-green-integration-tests:
name: Run Blue/Green Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 120
strategy:
fail-fast: false
max-parallel: 2
matrix:
task: [ "mysql-aurora-sync", "mysql-aurora-async", "pg-aurora-sync", "pg-aurora-async" ]

steps:
- name: 'Clone repository'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: 'Set up JDK 8'
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
distribution: 'corretto'
java-version: 8

- name: Install poetry
shell: bash
run: |
pipx install poetry==1.8.2
poetry config virtualenvs.prefer-active-python true

- name: Install dependencies
run: poetry install

- name: 'Configure AWS Credentials'
uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_DEPLOY_ROLE }}
role-session-name: python_bg_integration_tests
role-duration-seconds: 21600
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}

- name: 'Run Blue/Green Integration Tests'
run: |
./gradlew --no-parallel --no-daemon test-bgd-${{ matrix.task }} --info
env:
RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
MYSQL_VERSION: default
PG_VERSION: default

- name: 'Archive Blue/Green results'
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pytest-integration-report-bgd-${{ matrix.task }}
path: ./tests/integration/container/reports
retention-days: 5
2 changes: 1 addition & 1 deletion aws_advanced_python_wrapper/aio/blue_green_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ async def _open_connection_task(self) -> None:
ip_host_info = copy(host_info)
ip_host_info.host = ip_address
props_copy = copy(self._props)
WrapperProperties.IAM_HOST.set(props_copy, ip_host_info.host)
WrapperProperties.IAM_HOST.set(props_copy, host_info.host)

logger.debug("BlueGreenStatusMonitor.OpeningConnectionWithIp", self._bg_role, ip_host_info.host)
self._connection = await self._plugin_service.force_connect(ip_host_info, props_copy)
Expand Down
2 changes: 1 addition & 1 deletion aws_advanced_python_wrapper/blue_green_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ def _open_connection_task(self):
ip_host_info = copy(host_info)
ip_host_info.host = ip_address
props_copy = copy(self._props)
WrapperProperties.IAM_HOST.set(props_copy, ip_host_info.host)
WrapperProperties.IAM_HOST.set(props_copy, host_info.host)

logger.debug(
"BlueGreenStatusMonitor.OpeningConnectionWithIp", self._bg_role, ip_host_info.host)
Expand Down
Loading