Skip to content

Challenge Manager Prize Money Save Issues #198

Closed
@rootelement

Description

@rootelement

topcoder-platform/work-manager#694
topcoder-platform/work-manager#689

@rootelement @ThomasKranitsas I think we have a small problem in legacy challenge creation/update process. It might be causing the topcoder-platform/work-manager#694 as well. What I found from my debugging today is as follows:
• CM sends PUT request to v5 challenge api with correct prizeSets (@ThomasKranitsas we do pass default prizeSet with 0 money but here I am assuming that user has filled the correct prize money before hitting Save as Draft button), when user hits Save as Draft button.
• v5 API updates the data and raises challenge update event to the bus
• legacy processor consumes this event, and observes that challenge does not have legacyId set yet so, it internally calls its logic for handling the challenge create event. https://github.com/topcoder-platform/legacy-challenge-processor/blob/c6d9f607aef47af7088d2ec6e05aad8ec9e38de2/src/services/ProcessorService.js#L283
• now legacy processor creates the legacy challenge and PATCHES the challenge via v5 challenge api https://github.com/topcoder-platform/legacy-challenge-processor/blob/c6d9f607aef47af7088d2ec6e05aad8ec9e38de2/src/services/ProcessorService.js#L219
Let me know if that is not the process right now. Now, the problem is that I am seeing logs in challenge api two times (because we are hitting that two times) and first time when it was hit by CM, it has the correct prize money but when it was hit second time by legacy processor, it does not have correct prize money. Prize money is set to 0 in second case (logs at 17:43:04 in attached screenshot have prizeSets defaulted to 0 while logs at 17:42:59 has the correct prizeSet)

Screen Shot 2020-06-19 at 6 18 09 PM

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions