Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: merge release 4.46.1 into master #716

Merged
merged 43 commits into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f4436e2
ref: migrate inline queries for retrieval of submissions metadata to …
karrui Nov 10, 2020
a643edd
Merge pull request #608 from opengovsg/release-4.45.0
tshuli Nov 10, 2020
8ca8ba2
chore(deps-dev): bump @types/node from 14.14.6 to 14.14.7 (#611)
dependabot[bot] Nov 10, 2020
70fa5e4
fix: add required env vars for MyInfo (#612)
mantariksh Nov 10, 2020
bb78d01
chore(deps-dev): bump @typescript-eslint/parser from 4.5.0 to 4.7.0 (…
dependabot[bot] Nov 10, 2020
0c9e65d
refactor: convert errors.server.controller to typescript utility func…
tshuli Nov 10, 2020
f1b19fb
fix: use maildev for dev environment emails (#613)
mantariksh Nov 10, 2020
b11d06e
fix(deps): bump angular-aria from 1.8.0 to 1.8.2 (#619)
dependabot[bot] Nov 11, 2020
202587e
feat: Backend implementation for bulk attachment downloading (#555)
frankchn Nov 11, 2020
c0fd688
refactor: convert req.hashedFields to Set (#617)
mantariksh Nov 11, 2020
19a6480
chore(deps-dev): bump @types/mongoose from 5.7.36 to 5.7.37 (#597)
dependabot[bot] Nov 12, 2020
46f85fc
test: enable local e2e tests (#616)
mantariksh Nov 12, 2020
18d42df
fix(deps): bump jwt-decode from 2.2.0 to 3.1.1 (#594)
dependabot[bot] Nov 12, 2020
41d1a62
chore(deps-dev): bump supertest from 5.0.0 to 6.0.1 (#622)
dependabot[bot] Nov 12, 2020
b53347a
fix(deps): bump uuid from 8.3.0 to 8.3.1 (#626)
dependabot[bot] Nov 12, 2020
addc16a
ref: migrate createPresignedPost endpoint for images to TypeScript (#…
karrui Nov 12, 2020
b4c3a0a
chore(deps-dev): bump testcafe from 1.8.6 to 1.9.4 (#632)
dependabot[bot] Nov 13, 2020
2b57036
chore(deps-dev): bump babel-loader from 8.1.0 to 8.2.1 (#625)
dependabot[bot] Nov 13, 2020
030d2d6
fix(deps): bump angular from 1.8.0 to 1.8.2 (#633)
dependabot[bot] Nov 13, 2020
cb1a07e
style: make transfer ownership email more prominent (#630)
tshuli Nov 13, 2020
7c3aee3
fix(deps): bump helmet from 4.1.1 to 4.2.0 (#624)
dependabot[bot] Nov 16, 2020
21cb13c
fix(deps): bump @sentry/browser from 5.24.2 to 5.27.3 (#631)
dependabot[bot] Nov 16, 2020
df633d8
fix: package.json & package-lock.json to reduce vulnerabilities (#637)
snyk-bot Nov 16, 2020
c9d187e
ref: migrate createPresignedPost endpoint for logos to TypeScript (#…
karrui Nov 16, 2020
e0ba8f2
feat(monitoring): add memory monitoring to EC2 instances (#620)
liangyuanruo Nov 16, 2020
13b5ebf
fix: resolve & in url upon redirect, shift prefill to textfield c…
tshuli Nov 16, 2020
b233043
ref: migrate fetch form submission counts flow to Typescript (#592)
karrui Nov 16, 2020
37d3f57
chore(deps-dev): bump eslint from 7.12.1 to 7.13.0 (#643)
dependabot[bot] Nov 16, 2020
9f5d189
chore(deps-dev): bump @types/mongoose from 5.7.37 to 5.10.0 (#644)
dependabot[bot] Nov 16, 2020
bb0672d
chore(deps-dev): bump eslint-plugin-simple-import-sort from 5.0.3 to …
dependabot[bot] Nov 16, 2020
54825c9
ref: migrate streamEncryptedResponses flow to Typescript (#615)
karrui Nov 17, 2020
f63dfdf
refactor: migrate NRIC validator to TypeScript (#639)
liangyuanruo Nov 17, 2020
34c1c48
Merge pull request #648 from opengovsg/release-4.45.1-hotfix
mantariksh Nov 17, 2020
85b1fff
fix(deps): bump mongoose from 5.10.10 to 5.10.14 (#645)
dependabot[bot] Nov 17, 2020
772b295
feat: allow .oa files to be attached (#650)
karrui Nov 17, 2020
f25fd42
feat: upgrade spcp-auth-client (#649)
mantariksh Nov 17, 2020
d330cb6
refactor: migrate MyInfo functionality to TypeScript (#560)
mantariksh Nov 17, 2020
dbc4a23
chore: use travis_retry to retry flaky tests automatically (#641)
karrui Nov 17, 2020
bcdcf03
chore: bump version to v4.46.0
karrui Nov 17, 2020
a9d2068
fix: add minimal polyfill for ie11 in decryption worker
karrui Nov 17, 2020
46d3357
fix: check for undefined-ness on attachmentMetadata
karrui Nov 19, 2020
e67bb8b
fix: early return on undefined verification signature
karrui Nov 19, 2020
375df4f
chore: bump version to v4.46.1
karrui Nov 19, 2020
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
43 changes: 24 additions & 19 deletions .ebextensions/eb-memory-monitor.config
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
###################################################################################################
#### Memory monitoring for Elastic Beanstalk
#### https://medium.com/tomincode/cloudwatch-memory-monitoring-for-elastic-beanstalk-1caa98d57d5c
#### https://aws.amazon.com/premiumsupport/knowledge-center/elastic-beanstalk-memory-monitoring/
###################################################################################################

packages:
yum:
perl-DateTime: []
perl-Sys-Syslog: []
perl-LWP-Protocol-https: []
perl-Switch: []
perl-URI: []
perl-Bundle-LWP: [] # TODO(#638): Replace this yum package with perl-Digest-SHA.x86_64 for Amazon Linux 2 instances
sources:
/opt/cloudwatch: https://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip

container_commands:
00download:
command: "wget http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.2.zip"
ignoreErrors: true
01extract:
command: "unzip -o CloudWatchMonitoringScripts-1.2.2.zip"
ignoreErrors: true
02rmzip:
command: "rm CloudWatchMonitoringScripts-1.2.2.zip"
ignoreErrors: true
03prereq:
command: "yum install -y perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https"
ignoreErrors: false
04cdinto:
command: "mv aws-scripts-mon/ /home/ec2-user"
ignoreErrors: true
05cron:
command: "crontab -l | grep -q 'mon-put-instance-data.pl' || crontab -l | { cat; echo '* * * * * /home/ec2-user/aws-scripts-mon/mon-put-instance-data.pl --mem-util --mem-used --mem-avail'; } | crontab -"
ignoreErrors: false
01-setupcron:
command: |
echo '*/5 * * * * root perl /opt/cloudwatch/aws-scripts-mon/mon-put-instance-data.pl `{"Fn::GetOptionSetting" : { "OptionName" : "CloudWatchMetrics", "DefaultValue" : "--mem-util --disk-space-util --disk-path=/" }}` >> /var/log/cwpump.log 2>&1' > /etc/cron.d/cwpump
02-changeperm:
command: chmod 644 /etc/cron.d/cwpump
03-changeperm:
command: chmod u+x /opt/cloudwatch/aws-scripts-mon/mon-put-instance-data.pl
option_settings:
"aws:autoscaling:launchconfiguration" :
IamInstanceProfile : "aws-elasticbeanstalk-ec2-role"
"aws:elasticbeanstalk:customoption" :
CloudWatchMetrics : "--mem-util --mem-used --mem-avail --disk-space-util --disk-space-used --disk-space-avail --disk-path=/ --auto-scaling"
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"extends": ["plugin:@typescript-eslint/recommended"],
"rules": {
// Rules for auto sort of imports
"simple-import-sort/sort": [
"simple-import-sort/imports": [
"error",
{
"groups": [
Expand Down
1 change: 1 addition & 0 deletions .template-env
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ FORMSG_SDK_MODE=
# Default environment variables have been included for local development
# purposes.
# MYINFO_CLIENT_CONFIG=stg
# MYINFO_FORMSG_KEY_PATH=./node_modules/@opengovsg/mockpass/static/certs/key.pem
# SPCP_COOKIE_MAX_AGE=7200000

# SP_FORMSG_KEY_PATH=./node_modules/@opengovsg/mockpass/static/certs/key.pem
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ script:
- set -e
- npm run lint-ci
- npm run build
- npm run test-ci
- travis_retry npm run test-ci
- npm run test-e2e-ci

before_deploy:
Expand Down
53 changes: 50 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,56 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [v4.45.1](https://github.com/opengovsg/FormSG/compare/v4.45.0...v4.45.1)

- fix: update email list correctly when deleting emails [`5776c2d`](https://github.com/opengovsg/FormSG/commit/5776c2d3d079e2876aacb17c41c398031a8ff939)
#### [v4.46.1](https://github.com/opengovsg/FormSG/compare/v4.46.0...v4.46.1)

- fix: check for undefined-ness on attachmentMetadata [`46d3357`](https://github.com/opengovsg/FormSG/commit/46d335785f51f40722ec0ba87510a17e7cf82edd)
- fix: early return on undefined verification signature [`e67bb8b`](https://github.com/opengovsg/FormSG/commit/e67bb8b1fc12e41c7c9cf1347a52ed7e30f2fbf5)

#### [v4.46.0](https://github.com/opengovsg/FormSG/compare/v4.45.0...v4.46.0)

> 18 November 2020

- chore: use travis_retry to retry flaky tests automatically [`#641`](https://github.com/opengovsg/FormSG/pull/641)
- refactor: migrate MyInfo functionality to TypeScript [`#560`](https://github.com/opengovsg/FormSG/pull/560)
- feat: upgrade spcp-auth-client [`#649`](https://github.com/opengovsg/FormSG/pull/649)
- feat: allow .oa files to be attached [`#650`](https://github.com/opengovsg/FormSG/pull/650)
- fix(deps): bump mongoose from 5.10.10 to 5.10.14 [`#645`](https://github.com/opengovsg/FormSG/pull/645)
- chore: merge release 4.45.1 hotfix back to develop [`#648`](https://github.com/opengovsg/FormSG/pull/648)
- refactor: migrate NRIC validator to TypeScript [`#639`](https://github.com/opengovsg/FormSG/pull/639)
- ref: migrate streamEncryptedResponses flow to Typescript [`#615`](https://github.com/opengovsg/FormSG/pull/615)
- chore(deps-dev): bump eslint-plugin-simple-import-sort from 5.0.3 to 6.0.0 [`#646`](https://github.com/opengovsg/FormSG/pull/646)
- chore(deps-dev): bump @types/mongoose from 5.7.37 to 5.10.0 [`#644`](https://github.com/opengovsg/FormSG/pull/644)
- chore(deps-dev): bump eslint from 7.12.1 to 7.13.0 [`#643`](https://github.com/opengovsg/FormSG/pull/643)
- ref: migrate fetch form submission counts flow to Typescript [`#592`](https://github.com/opengovsg/FormSG/pull/592)
- fix: resolve & in url upon redirect, shift prefill to textfield component [`#569`](https://github.com/opengovsg/FormSG/pull/569)
- feat(monitoring): add memory monitoring to EC2 instances [`#620`](https://github.com/opengovsg/FormSG/pull/620)
- ref: migrate createPresignedPost endpoint for logos to TypeScript [`#607`](https://github.com/opengovsg/FormSG/pull/607)
- fix: package.json & package-lock.json to reduce vulnerabilities [`#637`](https://github.com/opengovsg/FormSG/pull/637)
- fix(deps): bump @sentry/browser from 5.24.2 to 5.27.3 [`#631`](https://github.com/opengovsg/FormSG/pull/631)
- fix(deps): bump helmet from 4.1.1 to 4.2.0 [`#624`](https://github.com/opengovsg/FormSG/pull/624)
- style: make transfer ownership email more prominent [`#630`](https://github.com/opengovsg/FormSG/pull/630)
- fix(deps): bump angular from 1.8.0 to 1.8.2 [`#633`](https://github.com/opengovsg/FormSG/pull/633)
- chore(deps-dev): bump babel-loader from 8.1.0 to 8.2.1 [`#625`](https://github.com/opengovsg/FormSG/pull/625)
- chore(deps-dev): bump testcafe from 1.8.6 to 1.9.4 [`#632`](https://github.com/opengovsg/FormSG/pull/632)
- ref: migrate createPresignedPost endpoint for images to TypeScript [`#604`](https://github.com/opengovsg/FormSG/pull/604)
- fix(deps): bump uuid from 8.3.0 to 8.3.1 [`#626`](https://github.com/opengovsg/FormSG/pull/626)
- chore(deps-dev): bump supertest from 5.0.0 to 6.0.1 [`#622`](https://github.com/opengovsg/FormSG/pull/622)
- fix(deps): bump jwt-decode from 2.2.0 to 3.1.1 [`#594`](https://github.com/opengovsg/FormSG/pull/594)
- test: enable local e2e tests [`#616`](https://github.com/opengovsg/FormSG/pull/616)
- chore(deps-dev): bump @types/mongoose from 5.7.36 to 5.7.37 [`#597`](https://github.com/opengovsg/FormSG/pull/597)
- refactor: convert req.hashedFields to Set [`#617`](https://github.com/opengovsg/FormSG/pull/617)
- feat: Backend implementation for bulk attachment downloading [`#555`](https://github.com/opengovsg/FormSG/pull/555)
- fix(deps): bump angular-aria from 1.8.0 to 1.8.2 [`#619`](https://github.com/opengovsg/FormSG/pull/619)
- fix: use maildev for dev environment emails [`#613`](https://github.com/opengovsg/FormSG/pull/613)
- refactor: convert errors.server.controller to typescript utility function [`#602`](https://github.com/opengovsg/FormSG/pull/602)
- chore(deps-dev): bump @typescript-eslint/parser from 4.5.0 to 4.7.0 [`#610`](https://github.com/opengovsg/FormSG/pull/610)
- fix: add required env vars for MyInfo [`#612`](https://github.com/opengovsg/FormSG/pull/612)
- chore(deps-dev): bump @types/node from 14.14.6 to 14.14.7 [`#611`](https://github.com/opengovsg/FormSG/pull/611)
- build: merge release 4.45.0 into develop [`#608`](https://github.com/opengovsg/FormSG/pull/608)
- ref: migrate inline queries for retrieval of submissions metadata to model static methods [`#601`](https://github.com/opengovsg/FormSG/pull/601)
- chore: bump version to v4.46.0 [`bcdcf03`](https://github.com/opengovsg/FormSG/commit/bcdcf03afdbffb3562386129c793dee5b459b321)
- chore: bump version to 4.45.1 [`d2ec536`](https://github.com/opengovsg/FormSG/commit/d2ec536e5154c9459b97d6977724928dc68e2a19)
- fix: add minimal polyfill for ie11 in decryption worker [`a9d2068`](https://github.com/opengovsg/FormSG/commit/a9d2068d70c61c09910599a37bb8d5e14ead2ffc)

#### [v4.45.0](https://github.com/opengovsg/FormSG/compare/v4.44.0...v4.45.0)

Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Run the following shell command to build the Docker image from scratch. This wil
npm run dev
```

After the Docker image has finished building, the application can be accessed at [localhost:5000](localhost:5000).

If there have been no dependency changes in `package.json` or changes in the
`src/server.ts` file, you can run

Expand All @@ -71,6 +73,10 @@ docker-compose up
which does **not** rebuild the Docker image from scratch. This command usually
only takes ~15 seconds to finish starting up the image.

### Accessing email locally

We use [MailDev](https://github.com/maildev/maildev) to access emails in the development environment. The MailDev UI can be accessed at [localhost:1080](localhost:1080) when the Docker container is running.

### Environment variables

Docker-compose looks at various places for environment variables to inject into the containers.
Expand Down Expand Up @@ -195,7 +201,7 @@ Please contact FormSG (formsg@tech.gov.sg) for any details.

## Acknowledgements

FormSG acknowledges the work done by [Arielle Baldwynn](https://github.com/whitef0x0) to build and maintain [TellForm](https://github.com/tellform), on which FormSG is based.
FormSG acknowledges the work done by [Arielle Baldwynn](https://github.com/whitef0x0) to build and maintain [TellForm](https://github.com/tellform), on which FormSG is based.

Contributions have also been made by:
[@RyanAngJY](https://github.com/RyanAngJY)
Expand Down
10 changes: 8 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ services:
- AWS_ENDPOINT=http://localhost:4566
- SUBMISSIONS_RATE_LIMIT=200
- SEND_AUTH_OTP_RATE_LIMIT=60
- SES_PORT=25
- SES_HOST=maildev
- GA_TRACKING_ID
- SENTRY_CONFIG_URL
- TWILIO_ACCOUNT_SID
- TWILIO_API_KEY
- TWILIO_API_SECRET
- TWILIO_MESSAGING_SERVICE_SID
- SES_HOST
- SES_PASS
- SES_USER
- SES_PORT
- OTP_LIFE_SPAN
- AWS_REGION
- GOOGLE_CAPTCHA
Expand All @@ -64,6 +64,7 @@ services:
- CORPPASS_PARTNER_ENTITY_ID
- CORPPASS_ESRVC_ID
- CORPPASS_IDP_ID
- MYINFO_FORMSG_KEY_PATH
- IS_SP_MAINTENANCE
- IS_CP_MAINTENANCE
- AGGREGATE_COLLECTION
Expand Down Expand Up @@ -112,5 +113,10 @@ services:
- './docker-entrypoint-initaws.d:/docker-entrypoint-initaws.d'
network_mode: 'service:formsg' # reuse formsg service's network stack so that it can resolve localhost:4566 to localstack:4566

maildev:
image: maildev/maildev
ports:
- '1080:80'

volumes:
mongodata:
Loading