From e05a8df4c2e514ddf27383d8b0f61a2609efb389 Mon Sep 17 00:00:00 2001 From: Nick Jackson Date: Tue, 17 Oct 2023 11:44:27 +0100 Subject: [PATCH] Does this break stuff? --- .github/workflows/ci.yml | 6 +++--- .github/workflows/deploy.yml | 2 -- .python-version | 2 +- scripts/setup-localstack.sh | 2 +- template.yml | 16 ++++++++-------- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1449123..5e0d03b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" cache: pip cache-dependency-path: | requirements/base.txt @@ -29,9 +29,9 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@main - - name: Set up Python 3.11 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.10" - run: pip install -r requirements/local.txt - run: python -m pytest ds-caselaw-ingester/tests.py diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 92534cc..21a5486 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,8 +2,6 @@ name: Deploy lambda to AWS on: push: - branches: - - main jobs: build-deploy: diff --git a/.python-version b/.python-version index 2c07333..c8cfe39 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.11 +3.10 diff --git a/scripts/setup-localstack.sh b/scripts/setup-localstack.sh index 0dd0322..40d52b6 100755 --- a/scripts/setup-localstack.sh +++ b/scripts/setup-localstack.sh @@ -8,7 +8,7 @@ awslocal lambda create-function \ --function-name te-lambda \ --zip-file fileb://dist/lambda.zip \ --handler ds-caselaw-ingester/lambda_function.handler \ - --runtime python3.11 \ + --runtime python3.10 \ --environment "Variables={MARKLOGIC_HOST=$MARKLOGIC_HOST,MARKLOGIC_USER=$MARKLOGIC_USER,MARKLOGIC_PASSWORD=$MARKLOGIC_PASSWORD,AWS_BUCKET_NAME=$AWS_BUCKET_NAME,AWS_SECRET_KEY=$AWS_SECRET_KEY,AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID,AWS_ENDPOINT_URL=$AWS_ENDPOINT_URL,SQS_QUEUE_URL=$SQS_QUEUE_URL,ROLLBAR_TOKEN=$ROLLBAR_TOKEN,ROLLBAR_ENV=$ROLLBAR_ENV,NOTIFY_API_KEY=$NOTIFY_API_KEY,NOTIFY_EDITORIAL_ADDRESS=$NOTIFY_EDITORIAL_ADDRESS,NOTIFY_NEW_JUDGMENT_TEMPLATE_ID=$NOTIFY_NEW_JUDGMENT_TEMPLATE_ID,EDITORIAL_UI_BASE_URL=$EDITORIAL_UI_BASE_URL,PUBLIC_ASSET_BUCKET=$PUBLIC_ASSET_BUCKET}" \ --role arn:aws:iam::000000000000:role/lambda-role \ diff --git a/template.yml b/template.yml index 78cedb6..626a42b 100644 --- a/template.yml +++ b/template.yml @@ -72,7 +72,7 @@ Resources: Properties: CodeUri: ds-caselaw-ingester/ Handler: lambda_function.handler - Runtime: python3.11 + Runtime: python3.10 Architectures: - x86_64 Timeout: 420 @@ -92,13 +92,13 @@ Resources: ROLLBAR_ENV: !Ref RollbarEnv ROLLBAR_TOKEN: !Ref RollbarToken SQS_QUEUE_URL: !Ref SqsQueueUrl - VpcConfig: - SubnetIds: - - !Ref VpcSubnetId0 - - !Ref VpcSubnetId1 - - !Ref VpcSubnetId2 - SecurityGroupIds: - - !Ref VpcSecurityGroupId + VpcConfig: + SubnetIds: + - !Ref VpcSubnetId0 + - !Ref VpcSubnetId1 + - !Ref VpcSubnetId2 + SecurityGroupIds: + - !Ref VpcSecurityGroupId Outputs: # ServerlessRestApi is an implicit API created out of Events key under Serverless::Function