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

Timing of events #61

Closed
jmgasper opened this issue Aug 21, 2018 · 0 comments
Closed

Timing of events #61

jmgasper opened this issue Aug 21, 2018 · 0 comments

Comments

@jmgasper
Copy link
Collaborator

Current problem

We have a few cases in the topcoder-x-processor where multiple events can come in quickly, before the initial challenge has been created. Challenge creation through the TC Challenge API can take awhile, so if the processor tries to process an assignment event before the challenge has been created, it will attempt to create another challenge in the mean time.

What happens is that we end up with a bunch of duplicate challenges in TC Direct:

screen shot 2018-08-21 at 1 49 36 pm

Suggested fix

What we suggest doing is this:

  1. When a challenge API creation call is made, already have the mapping created in the issues table in the DB. We can add a new status field and fill it with appropriate states, like:
  • challenge_creation_pending
  • challenge_creation_failed
  • challenge_creation_successful
  1. When we get assignment or other update events, they can first check the status of the associated issue mapping. If the status is not challenge_creation_successful, they can retry after a set amount of time, which we already have the capability of doing

  2. If challenge creation fails, we can retry again

Validate fix

After the fix has been applied, no duplicate tickets should be created under any normal circumstances.

@jmgasper jmgasper added this to To do in October Release Aug 21, 2018
@jmgasper jmgasper moved this from To do to In progress in October Release Sep 12, 2018
jmgasper added a commit that referenced this issue Sep 21, 2018
#44
#61 (Major requirement)
#42 (Major requirement)
#43
#77 (Major requirement)
#66
@jmgasper jmgasper moved this from In progress to Done in October Release Sep 21, 2018
jmgasper added a commit that referenced this issue Sep 25, 2018
#44
#61 (Major requirement)
#42 (Major requirement)
#43
#77 (Major requirement)
#66
jmgasper added a commit that referenced this issue Oct 9, 2019
#44
#61 (Major requirement)
#42 (Major requirement)
#43
#77 (Major requirement)
#66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

1 participant