Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Attention! This is a fast challenge. The submission phase is 72 hours and all phases are shorter than usual.

Challenge Objectives

  • Update the legacy challenge migration script to include challenge settings based on the requirements below.

Tech Stack

  • Node.js

  • Swagger

  • DynamoDB

  • ElasticSearch

Project Background

In this series of challenges, we will build the version 5 (V5) of the challenge API.

Code Access

Legacy Challenge Migration Script

Repo: https://github.com/topcoder-platform/legacy-challenge-migration-script

Branch: develop

 

You may also have to run the following apps locally: https://github.com/topcoder-platform/resources-api (develop branch)

https://github.com/topcoder-platform/challenge-api (develop branch)

https://github.com/topcoder-platform/challenge-processor-es (develop branch)

Detailed requirements

As part of this challenge, you need to make the following changes on the legacy challenge migration script:

 

Challenges on the legacy API (v4) may contain additional information based on their type.

The V5 API is more flexible and allows custom challenge settings to be set regardless of the challenge type.

Some of the properties that may be present on challenges from the legacy API are:

  • allowStockArt - Can be found on design challenges.

  • submissionLimit - Can be found on design challenges.

  • submissionsViewable - Can be found on design challenges.

  • filetypes - Can be found on design challenges.

 

You need to create a configurable array of such properties and update the migration logic so it saves the content of those properties as a ChallengeSetting entry on the migrated challenge.

 

The Challenge API (v5) supports CRUD operations on the /challengeSettings endpoint.

 

The updated migration logic should:

  • Fetch existing challenge settings from the v5 challenge API.

  • For each configured property that needs to be saved as a ChallengeSetting, if it doesn’t already exist in the response from the /challengeSettings endpoint, create it.

  • On the migrated challenge, use the ID of the ChallengeSettings as the type and the String value of the legacy challenge as the value.

For example, the following challenge from v4:

{

   ...

   filetypes: [

"Layered PSD files created in Adobe Photoshop or similar"

   ]

}

 

Would result in the following `challengeSettings` object in the migrated challenge:

{

   …

   challengeSettings: [

      {

          type: “the UUID of the ChallengeSettting where it’s name is fileTypes”,

          value: “[\"Layered PSD files created in Adobe Photoshop or similar\"]”

      }

   ]

}

 

Should you have any questions, feel free to ask on the challenge forum!

What to Submit

Submit a git patch file for the latest commit in the develop branch.

Make sure to mention the exact commit you used so we can apply your patch without issues.

 


Final Submission Guidelines

Please read above

ELIGIBLE EVENTS:

2020 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30117325