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: release v5.17.0 #2249

Merged
merged 23 commits into from
Jun 29, 2021
Merged

build: release v5.17.0 #2249

merged 23 commits into from
Jun 29, 2021

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Jun 24, 2021

Release v5.17.0

Features

  • build(ci): create .env files in EB with Param Store ac27242
  • feat(config): support config via dotenv, use EB to create file #2194
  • feat(config): support env var config via dotenv 9fc8c9e
  • feat(feature-manager): remove sms from feature manager #2218
  • feat(feature-manager): remove spcp-myinfo from feature manager #2222

Improvements

  • docs(deploy): add information concerning SSM params ef7d79f
  • refactor: convert CsvMergedHeadersGenerator to typescript #2080
  • refactor(feature-manager): delete remaining unused code #2223
  • test: fix flaky form feedback test #2241

Dependency changes

  • chore(deps-dev): bump @babel/preset-env from 7.14.5 to 7.14.7 #2238
  • chore(deps-dev): bump @types/node from 14.17.3 to 14.17.4 #2245
  • chore(deps-dev): bump @typescript-eslint/eslint-plugin #2239
  • chore(deps-dev): bump @typescript-eslint/parser from 4.27.0 to 4.28.0 #2226
  • chore(deps-dev): bump core-js from 3.14.0 to 3.15.0 #2225
  • chore(deps-dev): bump core-js from 3.15.0 to 3.15.1 #2243
  • fix(deps): bump aws-sdk from 2.931.0 to 2.932.0 #2237
  • fix(deps): bump nocache from 3.0.0 to 3.0.1 #2236

dependabot bot and others added 23 commits June 22, 2021 02:39
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.14.0 to 3.15.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.15.0/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#2226)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 4.27.0 to 4.28.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
build: merge release 5.16.0 into develop
* refactor: convert response classes to typescript and change response to abstract class

* refactor: rearrange types

* refactor: convert CsvMergedHeadersGenerator to typescript

* refactor: edit export and import statements for CsvMergedHeadersGenerator

* fix: edit import statement of  generator in submissions.client.factory

* refactor: edit response types

* refactor: remove typing in jsdocs and edit types

* refactor: export response subclasses input types

* refactor: add ErrorResponse as default for response types

* refactor: shift hasProps to shared

* refactor: athrow error instead of returning ErrorResponse and edited typeguards

* refactor: change interface to type

* fix: fix incorrect import statement

* test: remove single header row test

* fix: fix bug caused by fieldtype guard and if else condition

* refactor: remove console.log

* refactor: convert extractAnswer to private function

* docs: add jsdocs for response factory

* docs: edit jsdocs for addRecord

* refactor: extract acheck for answer array

* refactor: revert extractAnswer to non-private function

* refactor: remove repeated check for type Array

* refactor: create SubmissionRecord type

* refactor: rename ccsv generator in submissions client factory

* refactor: make _data field private

* test: rrestore deleted test and edit expected unprocessed record

* test: remove repeated test

* refactor: use private modifier in typescript classes

* test: add tests for error cases

* refactor: add private modifier to date comparator

* refactor: remove underscore from private field

* refactor: extract type in csvmhgenerator

* refactor: replace strings with basic field enums

* fix: fix import statement
* feat(feature-manager): remove sms from feature manager

* build: add mock defaults for Twilio in dev environment
* feat(feature-manager): remove spcp-myinfo from feature manager

* build: populate Mockpass defaults for dev environment

* fix: fix build errors

* build: empty commit to trigger build
* refactor(feature-manager): delete FeatureManager class

* refactor(feature-manager): delete MissingFeatureError

* refactor(feature-manager): delete FeatureManager types

* refactor(feature-manager): rename config dir to features

* test: fix remaining test
Bumps [aws-sdk](https://github.com/aws/aws-sdk-js) from 2.931.0 to 2.932.0.
- [Release notes](https://github.com/aws/aws-sdk-js/releases)
- [Changelog](https://github.com/aws/aws-sdk-js/blob/master/CHANGELOG.md)
- [Commits](aws/aws-sdk-js@v2.931.0...v2.932.0)

---
updated-dependencies:
- dependency-name: aws-sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.14.5 to 7.14.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.14.7/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [nocache](https://github.com/helmetjs/nocache) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/helmetjs/nocache/releases)
- [Changelog](https://github.com/helmetjs/nocache/blob/main/CHANGELOG.md)
- [Commits](helmetjs/nocache@v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: nocache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Allow Form to be configured using a .env file, read by dotenv and
populated into `process.env`.

- `npm install dotenv`
- pick up the `.env` config using dotenv just before we invoke
  the application
- remove `.env` entry from `.dockerignore`
- use an .ebextensions config to create an .env from Parameter Store
  - determine the environment name by looking at container config files
    directly [1]
- mount the .env into /opt/formsg/.env

References:
[1]: https://aws.amazon.com/premiumsupport/knowledge-center/view-environment-properties-elastic-beanstalk/
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 4.27.0 to 4.28.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v4.28.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.15.0 to 3.15.1.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.15.1/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.17.3 to 14.17.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
feat(config): support config via dotenv, use EB to create file
@karrui
Copy link
Contributor Author

karrui commented Jun 24, 2021

@karrui

Tests

Deleting feature manager

  • Submit a form with a verified SMS field
  • Create, activate and submit a Singpass form in email mode. Repeat for storage mode and decrypt the response.
  • Create, activate and submit a Corppass form in email mode. Repeat for storage mode and decrypt the response.
  • Create, activate and submit a MyInfo form in email mode

@karrui
Copy link
Contributor Author

karrui commented Jun 24, 2021

@mantariksh

Tests

convert CsvMergedHeadersGenerator to TS

  • Create a storage mode form with a table field (to check TableResponse), a checkbox field (to check ArrayAnswerResponse) and an email field (to check SingleAnswerResponse). Submit a few responses and download the csv. Ensure that all answers to each form field are present in the csv and the metadata headers are also present.
  • Update the name of some field and submit the form again. Download all responses and the resulting CSV should use the new name as its header

@karrui
Copy link
Contributor Author

karrui commented Jun 24, 2021

@mantariksh

Tests

ELB, SSM, AWS, more acronyms

  • App runs
  • Remove a mandatory env var (e.g. any SPCP env var) from both Elastic Beanstalk and SSM Parameter Store, and update the ELB configuration. The configuration update should fail (as the server should not start), and the old servers should stay up the whole time (i.e. no app downtime).

@karrui karrui merged commit 7fb2f4a into release Jun 29, 2021
@karrui karrui deleted the release-v5.17.0 branch August 17, 2021 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants