From 553e3e1405bfc5658e7862b16407fbc921a89821 Mon Sep 17 00:00:00 2001 From: SpicyGarlicAlbacoreRoll Date: Mon, 2 Jun 2025 11:01:32 -0800 Subject: [PATCH 1/2] deployment: swap deployment region from us-west-2 to us-east-1 --- .github/workflows/deploy-prod-staging.yml | 98 +++++++++---------- .github/workflows/deploy-prod.yml | 36 +++---- .github/workflows/deploy-test-staging.yml | 98 +++++++++---------- .github/workflows/deploy-test.yml | 32 +++--- .../workflows/search-api-composite/action.yml | 2 +- tests/integration/test_stack.py | 2 +- 6 files changed, 134 insertions(+), 134 deletions(-) diff --git a/.github/workflows/deploy-prod-staging.yml b/.github/workflows/deploy-prod-staging.yml index badaf0a..6ff897a 100644 --- a/.github/workflows/deploy-prod-staging.yml +++ b/.github/workflows/deploy-prod-staging.yml @@ -8,59 +8,59 @@ on: jobs: # Deploy Staging - deploy-edc-prod-staging: - runs-on: ubuntu-latest - environment: edc-prod - permissions: - id-token: write - contents: read + # deploy-edc-prod-staging: + # runs-on: ubuntu-latest + # environment: edc-prod + # permissions: + # id-token: write + # contents: read - steps: - - name: Checkout - uses: actions/checkout@v4 + # steps: + # - name: Checkout + # uses: actions/checkout@v4 - - name: build - uses: ./.github/workflows/search-api-composite - with: - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - vpc-id: ${{ secrets.VPC_ID }} - subnet-ids: ${{ secrets.SUBNET_IDS }} - security-group: ${{ secrets.SECURITY_GROUP }} - staging: true + # - name: build + # uses: ./.github/workflows/search-api-composite + # with: + # aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} + # vpc-id: ${{ secrets.VPC_ID }} + # subnet-ids: ${{ secrets.SUBNET_IDS }} + # security-group: ${{ secrets.SECURITY_GROUP }} + # staging: true - run-edc-prod-staging-integration-tests: - needs: [deploy-edc-prod-staging] - runs-on: ubuntu-latest - environment: edc-prod - permissions: - id-token: write - contents: read - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Configure AWS OIDC credentials - uses: aws-actions/configure-aws-credentials@v3 - with: - role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole - aws-region: us-west-2 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.11" + # run-edc-prod-staging-integration-tests: + # needs: [deploy-edc-prod-staging] + # runs-on: ubuntu-latest + # environment: edc-prod + # permissions: + # id-token: write + # contents: read + # steps: + # - name: Checkout code + # uses: actions/checkout@v4 + # - name: Configure AWS OIDC credentials + # uses: aws-actions/configure-aws-credentials@v3 + # with: + # role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole + # aws-region: us-east-1 + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: "3.11" - - name: Install dependencies - shell: bash - run: | - python -m pip install --upgrade pip - python -m pip install -r requirements.txt - python -m pip install -r tests/requirements.txt - python -m pip install . + # - name: Install dependencies + # shell: bash + # run: | + # python -m pip install --upgrade pip + # python -m pip install -r requirements.txt + # python -m pip install -r tests/requirements.txt + # python -m pip install . - - name: run tests - shell: bash - run: | - pytest tests/integration/test_stack.py \ - --reruns 3 --reruns-delay 10 + # - name: run tests + # shell: bash + # run: | + # pytest tests/integration/test_stack.py \ + # --reruns 3 --reruns-delay 10 deploy-prod-staging: runs-on: ubuntu-latest @@ -93,7 +93,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole - aws-region: us-west-2 + aws-region: us-east-1 - name: Set up Python uses: actions/setup-python@v4 diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml index 6c29f69..20f5d0c 100644 --- a/.github/workflows/deploy-prod.yml +++ b/.github/workflows/deploy-prod.yml @@ -6,24 +6,24 @@ on: - prod jobs: - deploy-edc-prod: - runs-on: ubuntu-latest - environment: edc-prod - permissions: - id-token: write - contents: read - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: build - uses: ./.github/workflows/search-api-composite - with: - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - vpc-id: ${{ secrets.VPC_ID }} - subnet-ids: ${{ secrets.SUBNET_IDS }} - security-group: ${{ secrets.SECURITY_GROUP }} +# deploy-edc-prod: +# runs-on: ubuntu-latest +# environment: edc-prod +# permissions: +# id-token: write +# contents: read + +# steps: +# - name: Checkout +# uses: actions/checkout@v4 + +# - name: build +# uses: ./.github/workflows/search-api-composite +# with: +# aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} +# vpc-id: ${{ secrets.VPC_ID }} +# subnet-ids: ${{ secrets.SUBNET_IDS }} +# security-group: ${{ secrets.SECURITY_GROUP }} deploy-prod: runs-on: ubuntu-latest diff --git a/.github/workflows/deploy-test-staging.yml b/.github/workflows/deploy-test-staging.yml index 912b4d8..14c9df0 100644 --- a/.github/workflows/deploy-test-staging.yml +++ b/.github/workflows/deploy-test-staging.yml @@ -8,59 +8,59 @@ on: jobs: # Deploy Staging - deploy-edc-test-staging: - runs-on: ubuntu-latest - environment: edc-test - permissions: - id-token: write - contents: read + # deploy-edc-test-staging: + # runs-on: ubuntu-latest + # environment: edc-test + # permissions: + # id-token: write + # contents: read - steps: - - name: Checkout - uses: actions/checkout@v4 + # steps: + # - name: Checkout + # uses: actions/checkout@v4 - - name: build - uses: ./.github/workflows/search-api-composite - with: - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - vpc-id: ${{ secrets.VPC_ID }} - subnet-ids: ${{ secrets.SUBNET_IDS }} - security-group: ${{ secrets.SECURITY_GROUP }} - staging: true + # - name: build + # uses: ./.github/workflows/search-api-composite + # with: + # aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} + # vpc-id: ${{ secrets.VPC_ID }} + # subnet-ids: ${{ secrets.SUBNET_IDS }} + # security-group: ${{ secrets.SECURITY_GROUP }} + # staging: true - run-edc-test-staging-integration-tests: - needs: [deploy-edc-test-staging] - runs-on: ubuntu-latest - environment: edc-test - permissions: - id-token: write - contents: read - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Configure AWS OIDC credentials - uses: aws-actions/configure-aws-credentials@v3 - with: - role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole - aws-region: us-west-2 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.11" + # run-edc-test-staging-integration-tests: + # needs: [deploy-edc-test-staging] + # runs-on: ubuntu-latest + # environment: edc-test + # permissions: + # id-token: write + # contents: read + # steps: + # - name: Checkout code + # uses: actions/checkout@v4 + # - name: Configure AWS OIDC credentials + # uses: aws-actions/configure-aws-credentials@v3 + # with: + # role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole + # aws-region: us-east-1 + # - name: Set up Python + # uses: actions/setup-python@v4 + # with: + # python-version: "3.11" - - name: Install dependencies - shell: bash - run: | - python -m pip install --upgrade pip - python -m pip install -r requirements.txt - python -m pip install -r tests/requirements.txt - python -m pip install . + # - name: Install dependencies + # shell: bash + # run: | + # python -m pip install --upgrade pip + # python -m pip install -r requirements.txt + # python -m pip install -r tests/requirements.txt + # python -m pip install . - - name: run tests - shell: bash - run: | - pytest tests/integration/test_stack.py \ - --reruns 3 --reruns-delay 10 + # - name: run tests + # shell: bash + # run: | + # pytest tests/integration/test_stack.py \ + # --reruns 3 --reruns-delay 10 deploy-test-staging: runs-on: ubuntu-latest @@ -93,7 +93,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/SearchAPIActionsOIDCRole - aws-region: us-west-2 + aws-region: us-east-1 - name: Set up Python uses: actions/setup-python@v4 diff --git a/.github/workflows/deploy-test.yml b/.github/workflows/deploy-test.yml index 1291cf0..24372eb 100644 --- a/.github/workflows/deploy-test.yml +++ b/.github/workflows/deploy-test.yml @@ -6,24 +6,24 @@ on: - test jobs: - deploy-edc-test: - runs-on: ubuntu-latest - environment: edc-test - permissions: - id-token: write - contents: read +# deploy-edc-test: +# runs-on: ubuntu-latest +# environment: edc-test +# permissions: +# id-token: write +# contents: read - steps: - - name: Checkout - uses: actions/checkout@v4 +# steps: +# - name: Checkout +# uses: actions/checkout@v4 - - name: build - uses: ./.github/workflows/search-api-composite - with: - aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} - vpc-id: ${{ secrets.VPC_ID }} - subnet-ids: ${{ secrets.SUBNET_IDS }} - security-group: ${{ secrets.SECURITY_GROUP }} +# - name: build +# uses: ./.github/workflows/search-api-composite +# with: +# aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }} +# vpc-id: ${{ secrets.VPC_ID }} +# subnet-ids: ${{ secrets.SUBNET_IDS }} +# security-group: ${{ secrets.SECURITY_GROUP }} deploy-test: runs-on: ubuntu-latest diff --git a/.github/workflows/search-api-composite/action.yml b/.github/workflows/search-api-composite/action.yml index 5447d2e..51d1dcb 100644 --- a/.github/workflows/search-api-composite/action.yml +++ b/.github/workflows/search-api-composite/action.yml @@ -28,7 +28,7 @@ runs: uses: aws-actions/configure-aws-credentials@v3 with: role-to-assume: arn:aws:iam::${{ inputs.aws-account-id }}:role/SearchAPIActionsOIDCRole - aws-region: us-west-2 + aws-region: us-east-1 - name: Set up Python uses: actions/setup-python@v4 diff --git a/tests/integration/test_stack.py b/tests/integration/test_stack.py index 1efcc05..4a2505d 100644 --- a/tests/integration/test_stack.py +++ b/tests/integration/test_stack.py @@ -3,7 +3,7 @@ import asf_search as asf import os -cf_client = boto3.client('cloudformation', region_name=os.getenv('CDK_DEFAULT_REGION', 'us-west-2')) +cf_client = boto3.client('cloudformation', region_name=os.getenv('CDK_DEFAULT_REGION', 'us-east-1')) cf_response = cf_client.describe_stacks(StackName='SearchAPI-V3-Stack-Staging') rest_api_url = cf_response['Stacks'][0]['Outputs'][0]['OutputValue'] session = asf.ASFSession() From 87816f67abb3f804433fe3238ceca8a1895a741c Mon Sep 17 00:00:00 2001 From: Kim <33294735+SpicyGarlicAlbacoreRoll@users.noreply.github.com> Date: Mon, 2 Jun 2025 11:25:56 -0800 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7970932..da66823 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,11 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - --> +------ +## [1.0.3](https://github.com/asfadmin/Discovery-SearchAPI-v3/compare/v1.0.2...v1.0.3) +### Changed +- Swap deployment region from us-west-2 to us-east-1 + ------ ## [1.0.2](https://github.com/asfadmin/Discovery-SearchAPI-v3/compare/v1.0.1...v1.0.2)