Skip to content

[$100] Updates for event handling #293

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

Closed
jmgasper opened this issue Dec 12, 2020 · 4 comments
Closed

[$100] Updates for event handling #293

jmgasper opened this issue Dec 12, 2020 · 4 comments

Comments

@jmgasper
Copy link
Collaborator

From #229

@jmgasper Fixed Groups plugin. PR - topcoder-platform/forums-groups-plugin#42.

We always assumed that Topcoder project members are added when a group is created.
I saw a list of challenge.action.resource.create messages in a challenge forum processor logs.

  • After creating challenge , a challenge forum processor receives a list of 'challenge.action.resource.create' messages (one message per user). It caused the auto-follow/watch issue. User was added to a group before the group categories were created.
   "id":"a7cb5690-71bd-418f-8868-3d8bb9f15da5",
      "challengeId":"367c3b07-02b5-426e-84a1-5de41933e53a",
      "memberId":"8547899",
      "memberHandle":"TonyJ",
      "roleId":"0e9c6879-39e4-4eb6-b8df-92407890faf1",
      "created":"2020-12-11T06:27:35.000Z",
      "createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"
   }

After every updating a challenge, a challenge forum processor receives a list of 'challenge.action.resource.create' messages (one message includes one member or several members of the project).
So a challenge forum processor tries to add 'TonyJ ' to a group 6 times, copilot/manager - 4 times.
We may not need to process these messages. It is not even clear from the messages for what reasons we received it. Please correct me if I am wrong.

image

USER_REGISTRATION event ('challenge.notification.events' topic) occurs when a new user (participant) registers. It work fine for new users who registered for a challenge.

'challenge.action.resource.create' messages with several users:

[
   {
      "id":"a7cb5690-71bd-418f-8868-3d8bb9f15da5",
      "challengeId":"367c3b07-02b5-426e-84a1-5de41933e53a",
      "memberId":"8547899",
      "memberHandle":"TonyJ",
      "roleId":"0e9c6879-39e4-4eb6-b8df-92407890faf1",
      "created":"2020-12-11T06:27:35.000Z",
      "createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"
   },
   {
      "id":"c34bb303-cda1-4384-b2c2-22fdea014b2e",
      "challengeId":"367c3b07-02b5-426e-84a1-5de41933e53a",
      "memberId":"40152922",
      "memberHandle":"pshah_customer",
      "roleId":"2a4dc376-a31c-4d00-b173-13934d89e286",
      "created":"2020-12-11T06:27:38.000Z",
      "createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"
   },
   {
      "id":"3c55275a-87a4-403a-8ff1-ed83cb2204bc",
      "challengeId":"367c3b07-02b5-426e-84a1-5de41933e53a",
      "memberId":"8547899",
      "memberHandle":"TonyJ",
      "roleId":"2a4dc376-a31c-4d00-b173-13934d89e286",
      "created":"2020-12-11T06:27:38.000Z",
      "createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"
   }
]

Next message:

[
   {
      "id":"55bb61c9-0794-4f2f-ba67-6c834d9806ee",
      "challengeId":"367c3b07-02b5-426e-84a1-5de41933e53a",
      "memberId":"40158997",
      "memberHandle":"TCConManager",
      "roleId":"2a4dc376-a31c-4d00-b173-13934d89e286",
      "created":"2020-12-11T06:27:38.000Z",
      "createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"
   },
   {
      "id":"0df64fa6-12f2-4c50-b7d3-2c7140f5276d",
      "challengeId":"367c3b07-02b5-426e-84a1-5de41933e53a",
      "memberId":"40152855",
      "memberHandle":"pshah_copilot",
      "roleId":"2a4dc376-a31c-4d00-b173-13934d89e286",
      "created":"2020-12-11T06:27:38.000Z",
      "createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"
   },
   {
      "id":"9baf5713-7fe3-4425-b42f-93750b993e74",
      "challengeId":"367c3b07-02b5-426e-84a1-5de41933e53a",
      "memberId":"40158994",
      "memberHandle":"TCConnCopilot",
      "roleId":"2a4dc376-a31c-4d00-b173-13934d89e286",
      "created":"2020-12-11T06:27:38.000Z",
      "createdBy":"jGIf2pd3f44B1jqvOai30BIKTZanYBfU@clients"
   }
]
@jmgasper
Copy link
Collaborator Author

Contest https://www.topcoder.com/challenges/30157532 has been created for this ticket.

This is an automated message for ghostar via Topcoder X

@jmgasper
Copy link
Collaborator Author

Contest https://www.topcoder.com/challenges/30157532 has been updated - it has been assigned to obog.

This is an automated message for ghostar via Topcoder X

@jmgasper
Copy link
Collaborator Author

Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30157532

This is an automated message for ghostar via Topcoder X

@atelomycterus
Copy link
Collaborator

@jmgasper You closed and paid me for this ticket before I pushed challenge forum processor changes. Please apply PR-topcoder-platform/challenge-forum-processor#46.
topcoder-platform/forums-groups-plugin#42 hasn't been merged yesterday.
Thanks!

Changes

For challenge.action.resource.create

  • check a project role and set auto-watch/auto-follow
  • multiple users in one payload supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants