Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Deployment steps (Jan 2021)

Justin Gasper edited this page Jan 21, 2021 · 2 revisions

The production deploy will contain numerous new features and fixes, but the most important are:

  • V5 API usage
  • New Auth0 flow

We need to do things in this order:

  1. Apply the config changes below
  2. Merge from develop to master for:
  1. Run the migration script below

Config changes

These env values need to be added / changed:

topcoder-x-ui

  • CONNECT_URL_BASE : https://connect.topcoder.com/proects/

TC Connect / Direct ID migration

Currently, projects are configured in Topcoder-X with the Topcoder Direct ID for projects, used to pull things like the billing account and when launching tasks.

Going forward, we need to use the TC Connect ID instead. This is problematic because these two IDs (direct and connect) are not unique, meaning that if a user accidentally uses a Direct ID instead of a Connect ID, there's a chance that there could be an overlap and the wrong project will be used.

For the deployment, we need to run a small script that adds a "isConnect" value to the project table to indicate if the ID is / is not a Topcoder Connect ID. This will be set to "true" for all new projects, and the script will update any values where the flag is false with the connect ID associated with the direct project.

SCRIPT

To run the migration, in topcoder-x-processor:

  • Ensure that all env values are set according to the current config
  • Run npm run direct-connect-migration

Output should look like:

  npm run direct-connect-migration

> [email protected] direct-connect-migration /Users/justingasper/Documents/Git/topcoder-x-processor
> node scripts/direct-connect-migration.js

info: Starting batch 1
(node:74100) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
debug: Project with direct id 7377 (database: a0c65e70-513f-4d29-82fd-2286487add7f-1574743343733) was not found in connect
debug: Project with direct id 1234 (database: c2eda03e-4b6a-44df-b10e-1823ef6d6e12-1571880127191) was not found in connect
debug: Project with direct id 7377 (database: c0f5ab22-b31c-4726-bba0-72e7d578aa6b-1570513950249) was not found in connect
debug: Project with direct id 7377 (database: 50850400-41cf-4ab3-aa29-0597a5859865-1570768691126) was not found in connect
debug: Project with direct id 123 (database: 67eef17e-2382-46d3-86d3-42723d911a3b-1570766830854) was not found in connect
debug: Project with direct id 10833 (database: 1fe32a7f-c877-4b5f-b3fe-5faee8134665-1603866018190) was not found in connect
debug: Project with direct id 7377 (database: 2f178edb-6158-4d3b-9906-73a4ecfb89e2-1574742137466) was not found in connect
debug: Project with direct id 10833 (database: 72a8f876-6633-4577-a551-4544025ab654-1570125879556) was not found in connect
debug: Project with direct id 7377 (database: f9384eaf-9479-4ec8-beb3-5b79f89bb768-1574735019683) was not found in connect
debug: Migrated direct project: 16901 to connect: 6596, database id: 5204a1ed-b2f5-49c9-bc0e-8137f8b02f25-1570800018259
debug: Migrated direct project: 16665 to connect: 6363, database id: 971ef782-db79-48be-9783-216cfcff440e-1604536271971
debug: Migrated direct project: 15785 to connect: 5483, database id: 59624767-d45f-419a-ac0c-4422838ff83a-1574971980252
info: Migration completed
Clone this wiki locally