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

Create release v1.7.0 #124

Merged
merged 35 commits into from
Sep 4, 2021
Merged

Create release v1.7.0 #124

merged 35 commits into from
Sep 4, 2021

Conversation

sherryhli
Copy link
Member

@sherryhli sherryhli commented Sep 4, 2021

Notion ticket link

N/A

Implementation description

Steps to test

  1. For the following stack combinations, generate starter-code using the CLI

Stacks:

  • TypeScript, REST, MongoDB, auth, no-file-storage
  • TypeScript, REST, PostgreSQL, auth, no-file-storage
  • TypeScript, GraphQL, MongoDB, auth, no-file-storage
  • TypeScript, GraphQL, PostgreSQL, auth, no-file-storage
  • Python, REST, MongoDB, auth, no-file-storage
  • Python, REST, PostgreSQL, auth, no-file-storage

General testing workflow:

# run starter-code-cli locally
# when prompted for a directory, give the path to the directory 1 level above your local starter-code-v2
yarn dev --testing

# run the application
docker-compose up --build

# after testing, reset starter-code-v2
git reset --hard HEAD
  1. Some prerequisite steps:

When using PostgreSQL, create an admin user for yourself:

INSERT INTO users (first_name, last_name, auth_id, role) VALUES ('First', 'Last', 'FIREBASE_UID', 'Admin');

When using Python and PostgreSQL, you must run the initial migration to create tables with the flask db upgrade command:

docker exec -it starter-code-v2_py-backend_1 /bin/bash -c "flask db upgrade"

Switch the DB specified in the MG_DATABASE_URL env variable between typescript-test and python-test depending on the backend being used.

  1. Run the application
docker-compose up --build
  1. Follow the test plan in Integrate Google OAuth into Python backend #112 (skip step 3). After logging in, visit the "Display Entities" page to ensure that auth is working properly.

  2. Verify that the non OAuth sign-in and sign-up flows work

What should reviewers focus on?

  • Check the files that you modified recently and verify that the changes match what was in your PR

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

xinhaoz and others added 30 commits May 21, 2021 15:01
* Add example context components

* Add ts root dir to fix eslint errors

* Fix typo, add return type to reducer

* Add react plugins to eslint
* Add ts plugins to eslint, fix eslint errors

* Remove deep copy of form data

* Add more return types, change prettier errors to warn

* Type decoded JWT, move AuthenticatedUser to types file

* Create AuthTypes

* Fix token expiry

Co-authored-by: Sherry Li <[email protected]>
#45)

* duplicate code to authapiclient.ts

* refactor functions with localstorage to AuthAPIClient

* Update with removed REST tags

* update with pr fixes
* Configure Sequelize migrations using umzug

* Add defaultValue and allowNull options to add column example
* add initial validate decorator

* update with modified middleware and add decorators to the respective functions

* add decorator and validate method for entity dto
* Update README.md

* Add nodemailer config path to secret.config

* Add frontend stack to README.md

* Add minor edits to README.md
* Add auth validators

* Add Entity and User Validators

* Refactor validation utils

* Add API error messages
* Swagger For Python

* Minor fixes
* Add initial file storage service

* Add initial file storage service

* Create and Update

* Add exception handling and more docstrings

* Make expiration time a parameter, clean up code

* Add content type parameter, update interface

Co-authored-by: Richard Chen <[email protected]>
* add initial files

* Fix firebase bucket init

* add create file implementation

* add interface notes and add checking if file already exists

* Add updateFile and deleteFile implementations

* update create file method

* update create method notes

* Refactor getFile

* remove import in server.ts

* Update error message on failure to get file

Co-authored-by: Sherry Li <[email protected]>

* add contentType param

* fix formatting in storageService.ts

* Make bucketName a param

* Fix bucket name format

Co-authored-by: tamim-khan <[email protected]>
Co-authored-by: Sherry Li <[email protected]>
* Delete repeated requirements

* Add pytest to requirements

* Create python test examples

* Add typescript BE examples

* Create frontend sample tests

* Add test-db to docker-compose

* Update tests for docker containers

* Update psql conn string

* Add mongodb-memory-server dependency libcurl3 to docker container

* Add mongomock and pytest-mock to py requirements

* Create test_user_service

* Add pg user service test
* Configure SQLAlchemy migrations

* Fix create_app configs when calling from Flask CLI
* Update README.md

* Apply suggestions from code review

Co-authored-by: Sherry Li <[email protected]>

Co-authored-by: Sherry Li <[email protected]>
…Hub Actions (#87)

* Set up frontend hosting using Firebase

* Set up GitHub Actions for frontend deploy preview and automated prod deployment

* Set working directory in frontend deployment GitHub Actions

* Add yarn install step to deployment scripts

* Add entryPoint to action-hosting-deploy step

* Use separate backend urls for previews and prod
* Set extended option in express.urlencoded in server.ts

* Fix user_id casing in Python openapi.json

* Simplify Python DTO validators

* Add newline in Logout.tsx

* Rename TypeScript storageService to fileStorageService
* temp changes

* add initial changes to EntityServiceMg

* Fix update function in entityservice

* Add file crud methods to postgres entity service

* Add file content type validation

* Fix create endpoints

* Add local file storing to graphql resolvers

* Add endpoint for getting file based on fileUUID

* Change storage service to store bucketName instead of the bucket

* Minor fixes

* Fix update functions in entity service

* Minor fixes

* Add content type to entity request DTO and filestorageservice calls

* Fix graphql

* Fix imports

* Refactor create/update to prevent dangling file references

* Address comments

* Wait for file to finish writing before continuing

* Delete file after uploading

* Add awaits to filestorageservice calls

Co-authored-by: Richard Chen <[email protected]>
Co-authored-by: Emily Louie <[email protected]>
* Update EntityService Mongo

* Update Python Entity models for file storage.

* Add file get request to routes, work on entity services

* Add entity request dto for python

* Add file support in entity routes

* Add file to update route

* Update validator and DTO

* Add content type check to python entity dto validator

* Add file storage support to Python Postgres Entity service

* Add PUT logic to Python Postgres entity service update function

* Change update logic for mongo

* lint

* Update EntityService Mongo

* Update Python Entity models for file storage.

* Add file get request to routes, work on entity services

* Add entity request dto for python

* Add file support in entity routes

* Add file to update route

* Update validator and DTO

* Add content type check to python entity dto validator

* Add file storage support to Python Postgres Entity service

* Add PUT logic to Python Postgres entity service update function

* Change update logic for mongo

* lint

* Fix python file get endpoint file storage service call

* Remove EntityDTO.file_name from Mongo Impl

* Update validator to check for missing body

* fix

* Fix file get endpoint auth, rename entity DTO variable

* Remove EntityDTO.file_name from Postgres Impl

* Update get_file to return object

* Fix bug in mongo service update logic

* Fix Postgres update route and logic

* Fix python postgres pop file and lint code.

* Postgres migration to add entity file name

Co-authored-by: Bruce He <[email protected]>
* initial files

* add a responseutil

* update rest api

* Add new Graphql querires

* Address PR comments and remove CSV option for requests that return single items

* Change generateCSV function to match frontends

* update yarn.lock

* Fix yarn.lock

Co-authored-by: Alex Guo <[email protected]>
* initial files

* add a responseutil

* update rest api

* Add download csv functionality from frontend utility

* Add new Graphql querires

* Address PR comments and remove CSV option for requests that return single items

* Change generateCSV function to match frontends

* update yarn.lock

* Fix yarn.lock

* Add backend API integration

Co-authored-by: Emily Louie <[email protected]>
* Initial change

Linter and tests

Update default options

csv default settings

Examples and minor format changes

Update docker-compose.yml

Moved tests to unit

* Add minor fixes

Co-authored-by: Sherry Li <[email protected]>
* Add endpoints for register user with email verification

* Check email verified on the firebase user instead of the token
* Add endpoints to register user using email verification

* fix import and add validator

* Add validation for RegisterUserDTO

* Fix accessing the email verification from token

* Change the verification email title

* check email verified in firebase user rather than token
* Add sign-up page & auth client register functions

* Rebase on main and make minor routing changes

Co-authored-by: Sherry Li <[email protected]>
* Add google oauth signin to firebase rest client

* Add google oauth login and signup functionality

* Add frontend for google oauth signin

* Fix backend

* Add comment for google user id token
@sherryhli sherryhli force-pushed the sherry/release-v1.7.0 branch from d9d385b to 298fe99 Compare September 4, 2021 18:55
@sherryhli sherryhli marked this pull request as ready for review September 4, 2021 22:19
Copy link
Contributor

@alexguo8 alexguo8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes lgtm, doesn't seem like there are any new tags

@sherryhli sherryhli merged commit a02e806 into release Sep 4, 2021
@sherryhli sherryhli deleted the sherry/release-v1.7.0 branch September 4, 2021 23:23
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.

8 participants