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

Add and integrate match service #56

Merged
merged 28 commits into from
Oct 20, 2024
Merged

Add and integrate match service #56

merged 28 commits into from
Oct 20, 2024

Conversation

samuelim01
Copy link

@samuelim01 samuelim01 commented Oct 20, 2024

Description

Create and integrated match service with frontend.

  • Match service with API calls, and consumers and producers using RabbitMQ (for now).
  • Documentation and logging for match service
  • Integrate match service with matching page for initial match request, cancellation, and polling of match request status
  • Frontend timer on match page
  • Docker dependencies to ensure services do not fail to start up, especially match service due to a dependency on RabbitMQ.

Checklist

  • I have updated documentation
  • All tests passing

Screenshots (if applicable)

image
image
image

samuelim01 and others added 27 commits October 20, 2024 19:22
* Fix minor typos
* Modify requests to use POST body rather than query params
* Ensure match request only finds requests within valid time
* Fix one minute being defined as 20 seconds on match service

Co-authored-by: Bryan Lee <[email protected]>
* Reorder function declarations for finding match dialog
* Remove unecessary comments
* Simplified the endpoint to solely reset the validity of the match request, removing any unnecessary code.
* Fix minor typos
* Fix DB calls not returning updated objects
@McNaBry McNaBry linked an issue Oct 20, 2024 that may be closed by this pull request
@limcaaarl
Copy link

Bug: A user can have multiple instances of match found.

Steps:

  1. Open 2 tabs for user1, and another 2 tabs for user2.
  2. Select and match the preferences as per usual, such that the first tab for both user1 and user2 have common topics and same difficulty and the same for the second tab for both user1 and user2.
  3. Start matching
  4. Match found will be triggered for both tabs for both users, resulting in 2 instances of match found for both users.

@samuelim01
Copy link
Author

Bug: A user can have multiple instances of match found.

Steps:

  1. Open 2 tabs for user1, and another 2 tabs for user2.
  2. Select and match the preferences as per usual, such that the first tab for both user1 and user2 have common topics and same difficulty and the same for the second tab for both user1 and user2.
  3. Start matching
  4. Match found will be triggered for both tabs for both users, resulting in 2 instances of match found for both users.

This was intended behaviour, such that a user can be in multiple sessions at the same time. However, a user will not pair up with themselves.

* When clearing the input field, topics is temporarily set to null before the onClear event is emitted
* This causes hasQuestionsValidator to reference a null variable
* The fix is to add an additional Validators.required to prevent hasQuestionsValidator from firing before topics is set to an empty array
Copy link

@limcaaarl limcaaarl left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link

@McNaBry McNaBry left a comment

Choose a reason for hiding this comment

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

LGTM

@samuelim01 samuelim01 merged commit b13bd16 into main Oct 20, 2024
4 checks passed
KhoonSun47 added a commit to KhoonSun47/cs3219-ay2425s1-project-g03 that referenced this pull request Oct 23, 2024
* main:
  Add and integrate match service (CS3219-AY2425S1#56)
  Add Match Page (CS3219-AY2425S1#44)

# Conflicts:
#	compose.dev.yml
#	compose.yml
#	frontend/src/app/app.routes.ts
@samuelim01 samuelim01 deleted the match-service branch October 31, 2024 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Match Service
3 participants