Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Pocket/pocket-monorepo into github-…
Browse files Browse the repository at this point in the history
…actions
  • Loading branch information
bassrock committed Aug 20, 2024
2 parents be9fa9e + 1fa1816 commit a74687c
Show file tree
Hide file tree
Showing 84 changed files with 1,121 additions and 1,623 deletions.
1 change: 1 addition & 0 deletions .github/actions/cdktf/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ runs:
env:
TERRAFORM_TOKEN: ${{ inputs.pagerduty-token }}
GITHUB_TOKEN: ${{ inputs.github-token }}
PAGERDUTY_TOKEN: ${{ inputs.pagerduty-token }}
run: |
cd ${{ inputs.stack-output-path }}
if [ "${{ inputs.behavior }}" = "apply" ]; then
Expand Down
1 change: 1 addition & 0 deletions .github/actions/raw-terraform/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ runs:
env:
TERRAFORM_TOKEN: ${{ inputs.pagerduty-token }}
GITHUB_TOKEN: ${{ inputs.github-token }}
PAGERDUTY_TOKEN: ${{ inputs.pagerduty-token }}
run: |
cd ${{ inputs.stack-output-path }}
if [ "${{ inputs.behavior }}" = "apply" ]; then
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/account-data-deleter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/account-delete-monitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/annotations-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/braze/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/client-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/feature-flags/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/fxa-webhook-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/image-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/instant-sync-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/list-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/parser-graphql-wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/pocket-event-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/push-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/sendgrid-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/shareable-lists-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/shared-snowplow-consumer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/shares-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/transactional-emails/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/user-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
2 changes: 1 addition & 1 deletion infrastructure/v3-proxy-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"@types/node": "^20.16",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
25 changes: 1 addition & 24 deletions infrastructure/v3-proxy-api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import {
} from '@cdktf/provider-aws';
import { provider as localProvider } from '@cdktf/provider-local';
import { provider as nullProvider } from '@cdktf/provider-null';
import {
provider as pagerdutyProvider,
dataPagerdutyEscalationPolicy,
} from '@cdktf/provider-pagerduty';
import {
PocketALBApplication,
PocketPagerDuty,
Expand All @@ -29,9 +25,6 @@ class Stack extends TerraformStack {
region: 'us-east-1',
defaultTags: [{ tags: config.tags }],
});
new pagerdutyProvider.PagerdutyProvider(this, 'pagerduty_provider', {
token: undefined,
});
new localProvider.LocalProvider(this, 'local_provider');
new nullProvider.NullProvider(this, 'null_provider');

Expand Down Expand Up @@ -87,23 +80,7 @@ class Stack extends TerraformStack {
return undefined;
}

const nonCriticalEscalationPolicyId =
new dataPagerdutyEscalationPolicy.DataPagerdutyEscalationPolicy(
this,
'non_critical_escalation_policy',
{
name: 'Pocket On-Call: Default Non-Critical - Tier 2+ (Former Backend Temporary Holder)',
},
).id;

return new PocketPagerDuty(this, 'pagerduty', {
prefix: config.prefix,
service: {
// This is a Tier 2 service and as such only raises non-critical alarms.
criticalEscalationPolicyId: nonCriticalEscalationPolicyId,
nonCriticalEscalationPolicyId: nonCriticalEscalationPolicyId,
},
});
return undefined;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions lambdas/account-data-deleter-batch-delete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
},
"devDependencies": {
"@pocket-tools/eslint-config": "workspace:*",
"@types/aws-lambda": "8.10.141",
"@types/aws-lambda": "8.10.143",
"@types/jest": "29.5.12",
"@types/lodash": "4.17.7",
"@types/node": "^20.16",
"jest": "29.7.0",
"nock": "14.0.0-beta.11",
"ts-jest": "29.2.3",
"ts-jest": "29.2.4",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { config } from '../config';
import { deleteUserMutationCaller, userApiCalls } from './deleteMutation';
import nock = require('nock');
import nock from 'nock';

describe('deleteUser mutation test', () => {
const testUserId = '1001';
Expand Down
2 changes: 1 addition & 1 deletion lambdas/account-data-deleter-batch-delete/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export async function deleteUsers(dynamoUtils: BatchDeleteDyanmoClient) {
try {
const deletedId = await deleteUserMutationCaller(userId.toString());
deletedUserIds.push(parseInt(deletedId));
} catch (e) {
} catch {
Sentry.captureException({ message: `unable to delete userId ${userId}` });
console.log(`unable to delete userId ${userId}`);
}
Expand Down
6 changes: 3 additions & 3 deletions lambdas/account-data-deleter-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
},
"devDependencies": {
"@pocket-tools/eslint-config": "workspace:*",
"@types/aws-lambda": "8.10.141",
"@types/aws-lambda": "8.10.143",
"@types/jest": "29.5.12",
"@types/node": "^20.16",
"jest": "29.7.0",
"nock": "14.0.0-beta.11",
"ts-jest": "29.2.3",
"ts-jest": "29.2.4",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
6 changes: 3 additions & 3 deletions lambdas/account-delete-monitor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
},
"devDependencies": {
"@pocket-tools/eslint-config": "workspace:*",
"@types/aws-lambda": "8.10.141",
"@types/aws-lambda": "8.10.143",
"@types/jest": "29.5.12",
"@types/node": "^20.16",
"jest": "29.7.0",
"nock": "14.0.0-beta.11",
"ts-jest": "29.2.3",
"ts-jest": "29.2.4",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
6 changes: 3 additions & 3 deletions lambdas/annotations-api-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
},
"devDependencies": {
"@pocket-tools/eslint-config": "workspace:*",
"@types/aws-lambda": "8.10.141",
"@types/aws-lambda": "8.10.143",
"@types/jest": "29.5.12",
"@types/node": "^20.16",
"jest": "29.7.0",
"nock": "14.0.0-beta.11",
"ts-jest": "29.2.3",
"ts-jest": "29.2.4",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
6 changes: 3 additions & 3 deletions lambdas/fxa-webook-proxy-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@
},
"devDependencies": {
"@pocket-tools/eslint-config": "workspace:*",
"@types/aws-lambda": "8.10.141",
"@types/aws-lambda": "8.10.143",
"@types/jest": "29.5.12",
"@types/jsonwebtoken": "^9.0.5",
"@types/jwk-to-pem": "^2.0.1",
"@types/node": "^20.16",
"jest": "29.7.0",
"nock": "14.0.0-beta.11",
"nodemon": "3.1.4",
"ts-jest": "29.2.3",
"ts-jest": "29.2.4",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
6 changes: 3 additions & 3 deletions lambdas/fxa-webook-proxy-sqs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
},
"devDependencies": {
"@pocket-tools/eslint-config": "workspace:*",
"@types/aws-lambda": "8.10.141",
"@types/aws-lambda": "8.10.143",
"@types/jest": "29.5.12",
"@types/jsonwebtoken": "^9.0.5",
"@types/node": "^20.16",
"jest": "29.7.0",
"nock": "14.0.0-beta.11",
"nodemon": "3.1.4",
"ts-jest": "29.2.3",
"ts-jest": "29.2.4",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
6 changes: 3 additions & 3 deletions lambdas/instant-sync-events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
"devDependencies": {
"@aws-sdk/client-sqs": "3.629.0",
"@pocket-tools/eslint-config": "workspace:*",
"@types/aws-lambda": "8.10.141",
"@types/aws-lambda": "8.10.143",
"@types/jest": "29.5.12",
"@types/node": "^20.16",
"jest": "29.7.0",
"ts-jest": "29.2.3",
"ts-jest": "29.2.4",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
6 changes: 3 additions & 3 deletions lambdas/sendgrid-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
},
"devDependencies": {
"@pocket-tools/eslint-config": "workspace:*",
"@types/aws-lambda": "8.10.141",
"@types/aws-lambda": "8.10.143",
"@types/jest": "29.5.12",
"@types/node": "^20.16",
"jest": "29.7.0",
"ts-jest": "29.2.3",
"ts-jest": "29.2.4",
"ts-node": "10.9.2",
"tsconfig": "workspace:*",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
Loading

0 comments on commit a74687c

Please sign in to comment.