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 0.2.0 #175

Merged
merged 110 commits into from
Oct 24, 2023
Merged

Create release 0.2.0 #175

merged 110 commits into from
Oct 24, 2023

Conversation

yhtMinceraft1010X
Copy link
Contributor

No description provided.

ong6 and others added 30 commits October 11, 2023 16:51
todos: 
make question service work with collaboration service and matching
service

can merge this before it gets too large - i've split the tickets alr

fixes #71

---------

Co-authored-by: YIHSUEN\Yi Hsuen <[email protected]>
Co-authored-by: Charisma Kausar <[email protected]>
Let's rename the env variables associated with the prisma relational 
database to avoid ambiguity and confusion with MongoDB.
- Operational Transformations in Collaboration Service
- Add utils/shared-ot.ts
  - next.config.js: Enable experimental feature - external dir
  - Some scary warning appears here
- Fix frontend
  - remove debouncer
- Add cursor support, defaults to 0

Current design:

Client --> Server: OT + Cursor
Server --> Client: Full text + Version number + Cursor

Version number incremented by Server, client should not increment
because version number refers to previous version that is edited upon.

Client waits for: 
- Acknowledgement from server of prev request
- Sync version (and text) from server
before they can send the next update request

This ensures no conflicting versions and mix-ups.
Let's add a production deployment workflow.
Fix #76 , fix #95

- On save text (save API) and disconnect of all users, will save Attempt
  - if question_id not set, it will be empty string 
- (Collab service) socket emit `api/collaboration-service/question/set`
to set question_id
- (User service) 
  - `api/user-service/:uid/attempts/` to get attempts of user
  - `api/user-service/attempt/` to create an attempt
    - uid string
    - question_id string
    - answer string
    - solved? boolean defaults to false

Frontend can call user service to save attempt for attempts done alone
(without collaboration rooms)
The prod workflow is currently failing at the first step due to
permission issues on the workflow file side.
yhtMinceraft1010X and others added 28 commits October 20, 2023 00:31
__Major changes__:
- Standardize using `c++` instead of `cpp`
- Remove "frameworks". The only valid languages now are python, java and
c++
- Introduce default code for all 3 languages
- Introduce default list of topics to choose from
- Allow questions to be posted to question service
- Users can now update and delete their own questions
- Pagination works correctly


![image](https://github.com/CS3219-AY2324S1/ay2324s1-course-assessment-g11/assets/47494777/47626f0e-a0b3-48c2-a1d0-679767114e69)

![image](https://github.com/CS3219-AY2324S1/ay2324s1-course-assessment-g11/assets/47494777/3c5086c5-b244-49b8-8211-cbf661ac8664)


__Changes to question service__:
- Supports atlas search for title (can extend to have fuzzy search, but
not important now)
- Start page is now 0-indexed
- GET /list now accepts body as a query param.
  - body includes the usual body parameters
- Only create one mongo connection
- Never close mongo connection (to prevent closing midway when other
users are querying database)

TODO:
- Improve styling (eg. code editor for the defaultCode sections instead
of text area)
- Fix issue with default code being populated again even after user
deletes everything --> **HELP WANTED**
- Also, leading whitespace tends to get deleted in the text area, but we
should allow whitespace --> **HELP WANTED**
- Filter by searchTitle, topics, difficulty --> **HELP WANTED**
- Delete directly from the table row?? (Low priority)
During the production deployment, building Docker images sometimes
fail due to errors in the source code. Production deployment tends to
take around 20 minutes so it is important to minimise retries.

Let's add a build simulation step in CI to test the TypeScript
compilation and allow us to rule out TypeScript compilation errors if
the production deployment workflow were to fail again.
Fixes #143 

Admin verification does not work because app.get(), app.post() etc are
used to apply the verification as middleware even though this is not
the correct way to do so.

Let's switch to app.use and decide whether to do the verification in 
the middleware using the req.method property.
Fixes #142 

Users on the leaderboard are linked to their profile.

---------

Co-authored-by: Ong Jun Xiong <[email protected]>
Fixes #41 and Fixes #74
@yhtMinceraft1010X yhtMinceraft1010X merged commit ce041dd into prod Oct 24, 2023
1 check passed
@yhtMinceraft1010X yhtMinceraft1010X temporarily deployed to production October 24, 2023 01:00 — with GitHub Actions Inactive
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