Skip to content

Commit 9dba351

Browse files
authored
Merge pull request #73 from supabase-community/upgrade-202311
feat: Upgrade at 2023.11
2 parents 54f7802 + e6e81b3 commit 9dba351

File tree

16 files changed

+232
-685
lines changed

16 files changed

+232
-685
lines changed

.github/workflows/cfn-publish-stable.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,27 @@ jobs:
1616
contents: read
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Get the version tag
2222
run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
2323

2424
- name: node.js setup
25-
uses: actions/setup-node@v3
25+
uses: actions/setup-node@v4
2626
with:
2727
node-version: '18'
2828

2929
- name: Install dependencies
3030
run: yarn install --check-files
3131

3232
- name: Configure AWS credentials
33-
uses: aws-actions/configure-aws-credentials@v2
33+
uses: aws-actions/configure-aws-credentials@v4
3434
with:
3535
role-to-assume: ${{ secrets.CDK_PUBLISHING_ROLE }}
3636
aws-region: us-west-2
3737

3838
- name: cdk synth
39-
run: npm run synth --no-version-reporting
39+
run: npx projen synth --name Supabase --no-version-reporting
4040
env:
4141
BSS_FILE_ASSET_PREFIX: stable/
4242

@@ -59,27 +59,27 @@ jobs:
5959
contents: read
6060
steps:
6161
- name: Checkout
62-
uses: actions/checkout@v3
62+
uses: actions/checkout@v4
6363

6464
- name: Get the version tag
6565
run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
6666

6767
- name: node.js setup
68-
uses: actions/setup-node@v3
68+
uses: actions/setup-node@v4
6969
with:
7070
node-version: '18'
7171

7272
- name: Install dependencies
7373
run: yarn install --check-files
7474

7575
- name: Configure AWS credentials
76-
uses: aws-actions/configure-aws-credentials@v2
76+
uses: aws-actions/configure-aws-credentials@v4
7777
with:
7878
role-to-assume: ${{ secrets.CDK_PUBLISHING_ROLE }}
7979
aws-region: us-west-2
8080

8181
- name: cdk synth
82-
run: npm run synth --no-version-reporting
82+
run: npx projen synth --name Supabase --no-version-reporting
8383
env:
8484
BSS_FILE_ASSET_PREFIX: ${{ env.TAG }}/
8585

.github/workflows/cfn-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
contents: read
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323

2424
- uses: technote-space/get-diff-action@v6
2525
with:
@@ -30,7 +30,7 @@ jobs:
3030
3131
- name: node.js setup
3232
if: env.GIT_DIFF
33-
uses: actions/setup-node@v3
33+
uses: actions/setup-node@v4
3434
with:
3535
node-version: '18'
3636

@@ -40,14 +40,14 @@ jobs:
4040

4141
- name: Configure AWS credentials
4242
if: env.GIT_DIFF
43-
uses: aws-actions/configure-aws-credentials@v2
43+
uses: aws-actions/configure-aws-credentials@v4
4444
with:
4545
role-to-assume: ${{ secrets.CDK_PUBLISHING_ROLE }}
4646
aws-region: us-west-2
4747

4848
- name: cdk synth
4949
if: env.GIT_DIFF
50-
run: npm run synth --no-version-reporting
50+
run: npx projen synth --name Supabase --no-version-reporting
5151

5252
- name: remove old template
5353
if: env.GIT_DIFF

.github/workflows/ecr-publish.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
IMAGE_NAME: kong
1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- uses: technote-space/get-diff-action@v6
2424
with:
@@ -28,29 +28,29 @@ jobs:
2828
2929
- name: Set up QEMU
3030
if: env.GIT_DIFF
31-
uses: docker/setup-qemu-action@v1
31+
uses: docker/setup-qemu-action@v3
3232

3333
- name: Set up Docker Buildx
3434
if: env.GIT_DIFF
35-
uses: docker/setup-buildx-action@v2
35+
uses: docker/setup-buildx-action@v3
3636

3737
- name: Configure AWS credentials
3838
if: env.GIT_DIFF
39-
uses: aws-actions/configure-aws-credentials@v2
39+
uses: aws-actions/configure-aws-credentials@v4
4040
with:
4141
role-to-assume: ${{ secrets.ECR_PUBLIC_ROLE }}
4242
aws-region: us-east-1
4343

4444
- name: Login to Amazon ECR Public
4545
id: login-ecr-public
4646
if: env.GIT_DIFF
47-
uses: aws-actions/amazon-ecr-login@v1
47+
uses: aws-actions/amazon-ecr-login@v2
4848
with:
4949
registry-type: public
5050

5151
- name: Build and push
5252
if: env.GIT_DIFF
53-
uses: docker/build-push-action@v3
53+
uses: docker/build-push-action@v5
5454
with:
5555
context: ./containers/kong
5656
file: ./containers/kong/Dockerfile
@@ -67,7 +67,7 @@ jobs:
6767
IMAGE_NAME: postgraphile
6868
steps:
6969
- name: Checkout
70-
uses: actions/checkout@v3
70+
uses: actions/checkout@v4
7171

7272
- uses: technote-space/get-diff-action@v6
7373
with:
@@ -77,29 +77,29 @@ jobs:
7777
7878
- name: Set up QEMU
7979
if: env.GIT_DIFF
80-
uses: docker/setup-qemu-action@v1
80+
uses: docker/setup-qemu-action@v3
8181

8282
- name: Set up Docker Buildx
8383
if: env.GIT_DIFF
84-
uses: docker/setup-buildx-action@v2
84+
uses: docker/setup-buildx-action@v3
8585

8686
- name: Configure AWS credentials
8787
if: env.GIT_DIFF
88-
uses: aws-actions/configure-aws-credentials@v2
88+
uses: aws-actions/configure-aws-credentials@v4
8989
with:
9090
role-to-assume: ${{ secrets.ECR_PUBLIC_ROLE }}
9191
aws-region: us-east-1
9292

9393
- name: Login to Amazon ECR Public
9494
id: login-ecr-public
9595
if: env.GIT_DIFF
96-
uses: aws-actions/amazon-ecr-login@v1
96+
uses: aws-actions/amazon-ecr-login@v2
9797
with:
9898
registry-type: public
9999

100100
- name: Build and push
101101
if: env.GIT_DIFF
102-
uses: docker/build-push-action@v3
102+
uses: docker/build-push-action@v5
103103
with:
104104
context: ./containers/postgraphile
105105
file: ./containers/postgraphile/Dockerfile

.projen/deps.json

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
const { awscdk } = require('projen');
22
const project = new awscdk.AwsCdkTypeScriptApp({
33
projenVersion: '0.70.5',
4-
cdkVersion: '2.87.0',
4+
cdkVersion: '2.108.0',
55
defaultReleaseBranch: 'main',
66
name: 'supabase-on-aws',
77
description: 'Self-hosted Supabase on AWS',
88
deps: [
9+
// AWS CDK
910
'@aws-cdk/aws-amplify-alpha',
1011
'@aws-cdk/aws-apigatewayv2-alpha',
1112
'@aws-cdk/aws-apigatewayv2-integrations-alpha',
12-
'@aws-lambda-powertools/logger',
13-
'@aws-lambda-powertools/tracer',
13+
// Lambda Powertools
14+
'@aws-lambda-powertools/logger@1.14.2',
15+
'@aws-lambda-powertools/tracer@1.14.2',
16+
// AWS SDK
1417
'@aws-sdk/client-cloudfront',
1518
'@aws-sdk/client-ecs',
1619
'@aws-sdk/client-secrets-manager',
@@ -20,6 +23,7 @@ const project = new awscdk.AwsCdkTypeScriptApp({
2023
'@aws-sdk/client-wafv2',
2124
'@aws-sdk/client-workmail',
2225
'@aws-sdk/util-utf8-node',
26+
// Others
2327
'@databases/pg',
2428
'@types/aws-lambda',
2529
'cdk-bootstrapless-synthesizer@^2.2.2',
-277 KB
Loading

package.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/amazon-ses-smtp/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class SesSmtp extends Construct {
4646
const passwordFunction = new NodejsFunction(this, 'PasswordFunction', {
4747
description: 'Supabase - Generate SMTP Password Function',
4848
entry: path.resolve(__dirname, 'cr-smtp-password.ts'),
49-
runtime: lambda.Runtime.NODEJS_18_X,
49+
runtime: lambda.Runtime.NODEJS_20_X,
5050
});
5151

5252
/** Custom resource provider to generate a SMTP password */

src/aws-waf/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class WebAcl extends cdk.NestedStack {
1717
const crFunction = new NodejsFunction(this, 'Function', {
1818
description: `Supabase - Create Web ACL Function (${this.node.path}/Function)`,
1919
entry: path.resolve(__dirname, 'cr-web-acl.ts'),
20-
runtime: lambda.Runtime.NODEJS_18_X,
20+
runtime: lambda.Runtime.NODEJS_20_X,
2121
timeout: cdk.Duration.seconds(15),
2222
initialPolicy: [
2323
new iam.PolicyStatement({

src/aws-workmail/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class Organization extends Construct {
5252
const createOrgFunction = new NodejsFunction(this, 'CreateOrgFunction', {
5353
description: 'Supabase - Create WorkMail Org Function',
5454
entry: path.resolve(__dirname, 'cr-workmail-org.ts'),
55-
runtime: lambda.Runtime.NODEJS_18_X,
55+
runtime: lambda.Runtime.NODEJS_20_X,
5656
timeout: cdk.Duration.seconds(10),
5757
initialPolicy: [
5858
new iam.PolicyStatement({
@@ -120,7 +120,7 @@ export class Organization extends Construct {
120120
const createUserFunction = new NodejsFunction(this, 'CreateUserFunction', {
121121
description: 'Supabase - Create WorkMail User Function',
122122
entry: path.resolve(__dirname, 'cr-workmail-user.ts'),
123-
runtime: lambda.Runtime.NODEJS_18_X,
123+
runtime: lambda.Runtime.NODEJS_20_X,
124124
timeout: cdk.Duration.seconds(10),
125125
initialPolicy: [
126126
new iam.PolicyStatement({

0 commit comments

Comments
 (0)