From 00cc4e9035cbeb7367cb49e24ee4bca68bf4716e Mon Sep 17 00:00:00 2001 From: liuliquan Date: Sun, 14 Apr 2019 19:30:39 +0800 Subject: [PATCH 1/5] Update MM related processors --- README.md | 81 +- Validation.md | 129 +- config/default.js | 14 +- config/mock.js | 9 - config/production.js | 6 +- config/staging.js | 16 +- config/test.js | 16 +- docker-compose.yml | 54 +- docker/legacy-submission-processor/Dockerfile | 1 + docs/Validation.md | 109 -- docs/Verification_with_DB.md | 138 -- index.js | 108 +- package-lock.json | 123 +- package.json | 12 +- src/bootstrap.js | 5 - src/common/constant.js | 49 - src/common/logger.js | 15 - src/services/SubmissionService.js | 139 +- test/kafka-ssl/client.crt | 16 - test/kafka-ssl/client.key | 27 - test/kafka-ssl/server.keystore.jks | Bin 3470 -> 0 bytes test/kafka-ssl/server.truststore.jks | Bin 755 -> 0 bytes test/mock-api.js | 39 - test/mock-submission-api.js | 168 -- test/produce-test-event.js | 155 -- test/sql/prepare.sql | 3 - test/sql/test.sql | 1621 ++--------------- test/test_files/Test.java | 5 - test/test_files/sqlParams.json | 15 - test/tests.js | 389 ++-- 30 files changed, 604 insertions(+), 2858 deletions(-) delete mode 100755 config/mock.js delete mode 100755 docs/Validation.md delete mode 100755 docs/Verification_with_DB.md delete mode 100755 src/bootstrap.js delete mode 100755 src/common/constant.js delete mode 100755 src/common/logger.js delete mode 100755 test/kafka-ssl/client.crt delete mode 100755 test/kafka-ssl/client.key delete mode 100755 test/kafka-ssl/server.keystore.jks delete mode 100755 test/kafka-ssl/server.truststore.jks delete mode 100755 test/mock-api.js delete mode 100755 test/mock-submission-api.js delete mode 100755 test/produce-test-event.js delete mode 100755 test/sql/prepare.sql delete mode 100755 test/test_files/Test.java delete mode 100755 test/test_files/sqlParams.json diff --git a/README.md b/README.md index 0cf89aa..8dd3524 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Topcoder - Submission Legacy Processor Application +# Topcoder - Legacy Submission Processor Application ---------------------- ## Requirements @@ -29,81 +29,14 @@ You can update the configuration file or set values to the corresponding environ - `AUTH0_URL` auth0 url - `AUTH0_AUDIENCE` auth0 audience - `TOKEN_CACHE_TIME` auth0 token cache time +- `AUTH0_PROXY_SERVER_URL` auth0 proxy server url - `AUTH0_CLIENT_ID` auth0 client id - `AUTH0_CLIENT_SECRET` auth0 client secret - `CHALLENGE_INFO_API` The challenge info api template with {cid} gets replaced with challenge id -- `CHALLENGE_SUBTRACK` The sub track of marathon match challenge +- `MM_CHALLENGE_SUBTRACK` The sub track of marathon match challenge - `./config/production.js`, `./config/staging.js`, `./config/test.js` will use same configuration variables as `./config/default.js` except `./config/test.js` will have new configurations for test only. -- `MOCK_SUBMISSION_API_PORT` The mock submission api port -- `MOCK_SERVER_PORT` The mock server port for challenge api - - `./config/mock.js` will use same configuration variables as `./config/default.js` except -- `MOCK_SERVER_PORT` The mock server port for challenge api - - `./test/test_files/sqlParams.json` will load necessary sql params used in test, it will only work if you run `./test/sql/test.sql`. - -> NOTE: ALL COMMANDS BELOW EXECUTE UNDER `````` directory + `./config/production.js`, `./config/staging.js`, `./config/test.js` will use same configuration variables as `./config/default.js` except `./config/test.js` will have new configurations for test only: +- `MOCK_API_PORT` The mock server port for submission && challenge api -To build the application you must set the `DB_SERVER_NAME` environment variable. This variable holds the database hostname. - -## Build Application Docker Image -We only need to do this once -```bash -export DB_SERVER_NAME=informix -docker-compose build lsp-app -``` - -## Run Kafka and Create Topic (if running kafka locally) - -Build Kafka image: -```bash -docker-compose build kafka -``` - -Run Kafka server: -```bash -docker-compose up -d kafka -docker exec -ti kafka bash -c "kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.create" -docker exec -ti kafka bash -c "kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.update" -``` - -## Install App Requirements -```bash -export DB_SERVER_NAME=informix -docker-compose up lsp-app-install -``` - -## Deployment -```bash -export DB_SERVER_NAME=informix -docker-compose up lsp-app -``` - -## Running Test -- Make sure you're running a clean database (you can take down tc-informix container and then up it again) -- Stop `legacy-sub-processor` application if it was running -- Install test data and you may start service `tc-informix` with command `docker-compose up tc-informix` if not started -```bash -docker cp test/sql/test.sql iif_innovator_c:/ -docker exec -ti iif_innovator_c bash -c "source /home/informix/ifx_informixoltp_tcp.env && dbaccess - /test.sql" -``` -- Run kafka container (and create topic if you haven't do this before) -- Run (you can use `docker-compose run lsp-app-test` too and it is more suitable for test command) -```bash -docker-compose up lsp-app-test -``` - -## Docker Build - -```bash -heroku login -heroku create -heroku container:push web --arg servername= -heroku container:release web -``` - -## Standard Code Style - -- Check code style `npm run lint` -- Check code style with option to fix the errors `npm run lint:fix` +## Validation +Follow the steps in [Validation.md](Validation.md) diff --git a/Validation.md b/Validation.md index 40c11ee..d1ce26c 100755 --- a/Validation.md +++ b/Validation.md @@ -1,91 +1,102 @@ -# Topcoder - Submission Legacy Processor Application - Verification +# Topcoder - Legacy Submission Processor Application - Verification ------------ +> NOTE: ALL COMMANDS BELOW EXECUTE UNDER `````` directory -Please check [docs/Validation.md](/docs/Validation.md) and [docs/Verification_with_DB.md](/docs/Verification_with_DB.md). - -Please note currently you have to verify application with database or please check [docs/Verification_with_DB.md](/docs/Verification_with_DB.md) only. - -I would recommend you to verify and test with docker otherwise you need to check related Dockerfile to have better understanding about how to setup environment properly(not recommend). +## Run Kafka and Create Topic +Build Kafka image: +```bash +docker-compose build kafka +``` -## Topcoder - Marathon Match - Legacy Processor -Please verify under linux or osx and I test under Ubuntu 18.04 and OSX 12 and windows may have issues to verify with docker. +Run Kafka server: +```bash +docker-compose up -d kafka +docker exec -ti kafka bash -c "kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.create" +docker exec -ti kafka bash -c "kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.update" +``` -Please check README.md and ensure you could run tests in docker environment successfully and you can check coverage folder to ensure -`src/services/MarathonSubmissionService.js`,`src/services/NonMarathonSubmissionService.js`,`src/services/LegacySubmissionIdService.js` are fully tested. +## Run Informix and Insert Test Data +Make sure you're running a clean database (you can take down and remove iif_innovator_c container and then up it again) +```bash +export DB_SERVER_NAME=informix -## Setup data in direct -Only necessary MM challenge related test data updated in `./test/sql/test.sql` and you can also setup complete test data using direct application. +docker kill iif_innovator_c +docker rm iif_innovator_c -You can follow [docs/Verification_with_DB.md](/docs/Verification_with_DB.md) to setup MM challenge in direct app, choose Marathon Match under Data menu during creating challenge and create new project with billing account if error to save mm challenge, in last step you have to create as draft challenge,add user as Submitter and get match submission phase id. +docker-compose up -d tc-informix -Currently tc-direct have [issue to save Match Round ID](https://github.com/appirio-tech/direct-app/issues/341) or you may see such logs from command `docker-compose logs tc-direct` if you want to save in page and refresh page. -```bash - | 07:48:37,097 ERROR [ExceptionMappingInterceptor] Invalid action class configuration that references an unknown class named [saveDraftContestAction] -tc-direct_1 | java.lang.RuntimeException: Invalid action class configuration that references an unknown class named [saveDraftContestAction] +docker logs iif_innovator_c +# When you see log like following then informix is started: +# starting rest listener on port 27018 +# starting mongo listener on port 27017 ``` -So you have to run such sql and replace with your new created mm challenge id. +**Then insert test data (which will be used by Unit Tests step and Verification step)**: ```bash -database tcs_catalog; -INSERT INTO informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(, 56, 2001, '132456', current, '132456', current); +docker cp test/sql/test.sql iif_innovator_c:/ +docker exec -ti iif_innovator_c bash -c "source /home/informix/ifx_informixoltp_tcp.env && dbaccess - /test.sql" ``` -Even you run sql direct app will still fail to show details page with such error -```bash - java.lang.NullPointerException -tc-direct_1 | at com.topcoder.direct.services.view.action.analytics.longcontest.MarathonMatchHelper.getMarathonMatchDetails(MarathonMatchHelper.java:115) -tc-direct_1 | at com.topcoder.direct.services.view.action.contest.launch.GetContestAction.executeAction(GetContestAction.java:476) -tc-direct_1 | at com.topcoder.direct.services.view.action.BaseDirectStrutsAction.execute(BaseDirectStrutsAction.java:305) -tc-direct_1 | at sun.reflect.GeneratedMethodAccessor553.invoke(Unknown Source) - +## Build Application Docker Image +We only need to do this once +```bash +export DB_SERVER_NAME=informix +docker-compose build lsp-app ``` -Please check https://github.com/appirio-tech/direct-app/blob/dev/src/java/main/com/topcoder/direct/services/view/action/contest/launch/GetContestAction.java#L502 - -Even latest direct codes will comment out related codes to solve this issue so just leave direct page there. - -## Run Legacy Submission Proc. app - -Make sure related services started and test data prepared and start app with `NODE_ENV=mock` to mock challenge api otherwise new created mm challenge will still consider as non mm challenge +## Install App dependencies ```bash -export NODE_ENV=mock export DB_SERVER_NAME=informix -docker-compose up lsp-app +rm -rf node_modules && docker-compose run lsp-app-install ``` -## Send Test data -From previous data setup I got: -- challengeId = 40005570 -- memberId = 132458 (user) -- submissionPhaseId = 100024 - -Let's send mm submission with example = 0 event to kafka: +**Note**, if the ***legacy-processor-module*** is changed locally (e.g. during local dev and not pushed to git yet), then you need to delete it from *node_modules* and copy the local changed one to *node_modules*: ```bash -docker exec -ti lsp-app bash -c "npm run produce-test-event mm 40005570 132458 100024 0" +rm -rf ./node_modules/legacy-processor-module +cp -rf ./node_modules +# e.g cp -rf ../legacy-processor-module ./node_modules ``` -Let's send mm submission with example = 1 event to kafka: +## Standard Code Style + +- Check code style `npm run lint` +- Check code style with option to fix the errors `npm run lint:fix` +## Run Unit Tests +- Stop `legacy-sub-processor` application if it was running: `docker stop lsp-app` +- Make sure kafka container running with topic created and informix container running with test data inserted +- Run unit tests: ```bash -docker exec -ti lsp-app bash -c "npm run produce-test-event mm 40005570 132458 100024 1" +docker-compose run lsp-app-test ``` -or you can run sample mm submission message directly(valid if run `test/sql/test.sql`) +## Verify with Test Data +Deploy first: ```bash -docker exec -ti lsp-app bash -c "npm run produce-test-event 9" +export DB_SERVER_NAME=informix +docker-compose up lsp-app ``` - -Please note currently processor will call challenge api to check whether challenge is MM challenge and default server api.topcoder-dev.com may not exist mm challenge created in local direct application. -So when we start app with NODE_ENV=mock it will use mock challenge api configurations and start mock challenge api server. +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event different-topic"` and verify that the app doesn't consume this message (no log) +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event null-message"` and verify that the app skips this message (log: `Skipped null or empty event`) +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event empty-message"` and verify that the app skips this message (log: `Skipped null or empty event`) +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event invalid-json"` and verify that the app skips this message (log: `Skipped non well-formed JSON message: ...`) +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event empty-json"` and verify that the app skips this message (log: `Skipped invalid event, reasons: "topic" is required ...`) +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event invalid-payload"` and verify that the app skips this message (log: `Skipped invalid event, reasons: "timestamp" must be...`) +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event wrong-topic"` and verify that the app skips this message (log: `Skipped event from topic wrong-topic`) +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event wrong-originator"` and verify that the app skips this message (log: `Skipped event from topic wrong-originator`) + +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event submission"` and verify that the app makes call to the Submission API successfully (log: `Patched to the Submission API: id 111, patch: {"legacySubmissionId":60000}`) and the Mock API log (`docker logs mock-api`) like `Patch /submissions/111 with {"legacySubmissionId":60000}`. +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event final-fix"` and verify that the app has log like `final fix upload, only insert upload`, and it should only insert into `upload` table, but not `submission`/`resource_submission` table. +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event not-allow-multiple"` and verify that the app has log like `delete previous submission for challengeId...`. +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event no-challenge-props"` and verify that the app has error log like `Error: null or empty result get challenge properties...`. +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event mm-submission"` and verify that the app skips this message (log: `Skipped event for subTrack: DEVELOP_MARATHON_MATCH`). ## Verify Database -Open your database explorer (**DBeaver** application, for instance). Connect to database informixoltp -Check table: `long_component_state`, `long_submission` or run below sql -```bash -select lcs.status_id,lcs.points, lcs.example_submission_number,lcs.submission_number,ls.* from informixoltp:long_submission ls, informixoltp:long_component_state lcs where ls.long_component_state_id=lcs.long_component_state_id -``` \ No newline at end of file +Open your database explorer (**DBeaver** application, for instance). Connect to database tcs_catalog +Check table: `upload`, `submission` and `resource_submission` + +## Cleanup +After verification, run `docker-compose down` to take down and remove containers. diff --git a/config/default.js b/config/default.js index 1cf7e4b..da151db 100755 --- a/config/default.js +++ b/config/default.js @@ -12,10 +12,10 @@ module.exports = { KAFKA_URL: process.env.KAFKA_URL || 'ssl://kafka-host:9093', // The client cert, can be (1) the path to the cert file, or (2) the cert content - KAFKA_CLIENT_CERT: process.env.KAFKA_CLIENT_CERT || './test/kafka-ssl/client.crt', + KAFKA_CLIENT_CERT: process.env.KAFKA_CLIENT_CERT || './docker/kafka/kafka-ssl/client.crt', // The client cert key, can be (1) the path to the cert key file, or (2) the cert key content - KAFKA_CLIENT_CERT_KEY: process.env.KAFKA_CLIENT_CERT_KEY || './test/kafka-ssl/client.key', + KAFKA_CLIENT_CERT_KEY: process.env.KAFKA_CLIENT_CERT_KEY || './docker/kafka/kafka-ssl/client.key', // The topic from which the app consumes events KAFKA_NEW_SUBMISSION_TOPIC: process.env.KAFKA_NEW_SUBMISSION_TOPIC || 'submission.notification.create', @@ -27,7 +27,7 @@ module.exports = { KAFKA_NEW_SUBMISSION_ORIGINATOR: process.env.KAFKA_NEW_SUBMISSION_ORIGINATOR || 'submission-api', // The Submission API URL - SUBMISSION_API_URL: process.env.SUBMISSION_API_URL || 'http://submission-api-host:3000', + SUBMISSION_API_URL: process.env.SUBMISSION_API_URL || 'http://mock-api-host:3000', // The Submission API timeout SUBMISSION_TIMEOUT: process.env.SUBMISSION_TIMEOUT || '10000', @@ -60,9 +60,9 @@ module.exports = { AUTH0_CLIENT_SECRET: process.env.AUTH0_CLIENT_SECRET, - CHALLENGE_INFO_API: process.env.CHALLENGE_INFO_API || 'https://api.topcoder-dev.com/v4/challenges?filter=id={cid}', // {cid} gets replaced with challenge id + AUTH0_PROXY_SERVER_URL: process.env.AUTH0_PROXY_SERVER_URL, - CHALLENGE_SUBTRACK: process.env.CHALLENGE_SUBTRACK || 'MARATHON_MATCH, DEVELOP_MARATHON_MATCH', - - AUTH0_PROXY_SERVER_URL: process.env.AUTH0_PROXY_SERVER_URL + CHALLENGE_INFO_API: process.env.CHALLENGE_INFO_API || 'http://mock-api-host:3000/challenges?filter=id={cid}', // {cid} gets replaced with challenge id + + MM_CHALLENGE_SUBTRACK: process.env.MM_CHALLENGE_SUBTRACK || 'MARATHON_MATCH, DEVELOP_MARATHON_MATCH' } diff --git a/config/mock.js b/config/mock.js deleted file mode 100755 index a9b375b..0000000 --- a/config/mock.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * The mock configuration. - */ -const MOCK_SERVER_PORT = 3003 -module.exports = { - MOCK_SERVER_PORT, - LOG_LEVEL: 'debug', - CHALLENGE_INFO_API: `http://localhost:${MOCK_SERVER_PORT}/challenges?filter=id={cid}` -} diff --git a/config/production.js b/config/production.js index f3d8eca..571cccd 100755 --- a/config/production.js +++ b/config/production.js @@ -60,5 +60,9 @@ module.exports = { AUTH0_CLIENT_SECRET: process.env.AUTH0_CLIENT_SECRET, - CHALLENGE_INFO_API: process.env.CHALLENGE_INFO_API + AUTH0_PROXY_SERVER_URL: process.env.AUTH0_PROXY_SERVER_URL, + + CHALLENGE_INFO_API: process.env.CHALLENGE_INFO_API, + + MM_CHALLENGE_SUBTRACK: process.env.MM_CHALLENGE_SUBTRACK } diff --git a/config/staging.js b/config/staging.js index 57d670a..7c6e1a4 100755 --- a/config/staging.js +++ b/config/staging.js @@ -50,5 +50,19 @@ module.exports = { // The Informix Submission Table Sequence Name ID_SEQ_SUBMISSION: process.env.ID_SEQ_SUBMISSION || 'submission_id_seq', - CHALLENGE_INFO_API: process.env.CHALLENGE_INFO_API + AUTH0_URL: process.env.AUTH0_URL, // Auth0 credentials for Submission Service + + AUTH0_AUDIENCE: process.env.AUTH0_AUDIENCE, + + TOKEN_CACHE_TIME: process.env.TOKEN_CACHE_TIME || '86400000', + + AUTH0_CLIENT_ID: process.env.AUTH0_CLIENT_ID, + + AUTH0_CLIENT_SECRET: process.env.AUTH0_CLIENT_SECRET, + + AUTH0_PROXY_SERVER_URL: process.env.AUTH0_PROXY_SERVER_URL, + + CHALLENGE_INFO_API: process.env.CHALLENGE_INFO_API, + + MM_CHALLENGE_SUBTRACK: process.env.MM_CHALLENGE_SUBTRACK } diff --git a/config/test.js b/config/test.js index 1ca12d0..4faa9b1 100755 --- a/config/test.js +++ b/config/test.js @@ -1,11 +1,9 @@ /** * The test configuration. */ -const MOCK_SUBMISSION_API_PORT = 3000 -const MOCK_SERVER_PORT = 3001 +const MOCK_API_PORT = 3001 module.exports = { - MOCK_SUBMISSION_API_PORT, - MOCK_SERVER_PORT, + MOCK_API_PORT, LOG_LEVEL: 'debug', // The client group ID for committing and fetching offsets. @@ -16,10 +14,10 @@ module.exports = { KAFKA_URL: 'ssl://kafka-host:9093', // The client cert, can be (1) the path to the cert file, or (2) the cert content - KAFKA_CLIENT_CERT: './test/kafka-ssl/client.crt', + KAFKA_CLIENT_CERT: './docker/kafka/kafka-ssl/client.crt', // The client cert key, can be (1) the path to the cert key file, or (2) the cert key content - KAFKA_CLIENT_CERT_KEY: './test/kafka-ssl/client.key', + KAFKA_CLIENT_CERT_KEY: './docker/kafka/kafka-ssl/client.key', // The topic from which the app consumes events KAFKA_NEW_SUBMISSION_TOPIC: 'submission.notification.create', @@ -31,7 +29,7 @@ module.exports = { KAFKA_NEW_SUBMISSION_ORIGINATOR: 'new-submission-originator', // The Submission API URL - SUBMISSION_API_URL: `http://localhost:${MOCK_SUBMISSION_API_PORT}`, + SUBMISSION_API_URL: `http://localhost:${MOCK_API_PORT}`, // The Submission API timeout SUBMISSION_TIMEOUT: 2000, @@ -54,7 +52,7 @@ module.exports = { // The Informix Submission Table Sequence Name ID_SEQ_SUBMISSION: 'submission_id_seq', - CHALLENGE_INFO_API: `http://localhost:${MOCK_SERVER_PORT}/challenges?filter=id={cid}`, // {cid} gets replaced with challenge id + CHALLENGE_INFO_API: `http://localhost:${MOCK_API_PORT}/challenges?filter=id={cid}`, // {cid} gets replaced with challenge id - CHALLENGE_SUBTRACK: 'MARATHON_MATCH, DEVELOP_MARATHON_MATCH' + MM_CHALLENGE_SUBTRACK: 'MARATHON_MATCH, DEVELOP_MARATHON_MATCH' } diff --git a/docker-compose.yml b/docker-compose.yml index d3ef78d..55ce74e 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,5 @@ version: '3.2' services: - tc-cache: - image: "redis:3.2.5" - ports: - - "6379:6379" - tc-informix: image: "appiriodevops/tc-database-scripts:latest" hostname: ${DB_SERVER_NAME} @@ -19,42 +14,6 @@ services: - "27883:27883" tty: true - tc-direct: - image: "appiriodevops/direct-app:latest" - links: - - "tc-informix" - - "tc-cache" - - "mock-services:tc-api.cloud.topcoder.com" - hostname: cockpit.cloud.topcoder.com - ports: - - "443:443" - - "8180:8180" - - "1198:1198" - - "1199:1199" - - "3973:3973" - - "5446:5446" - - run-online-review: - image: "appiriodevops/online-review:run" - environment: - - JAVA_OPTS=-Xms256m -Xmx512m - - DISABLE_ONLINE_REVIEW=0 - - DISABLE_AUTO_PILOT=0 - - DISABLE_LATE_DELIVERABLES_TRACKER=1 - - DISABLE_REVIEW_ASSIGNMENT=1 - ports: - - "80:8080" - links: - - tc-informix:db - - "mock-services:tc-api.cloud.topcoder.com" - entrypoint: /root/scripts/run.sh - - mock-services: - image: "appiriodevops/mock-services:latest" - ports: - - "8080:8080" - - "8443:8443" - kafka: build: context: ./docker/kafka @@ -63,21 +22,18 @@ services: ports: - "9093:9093" - "9092:9092" - # to override ssl related file - # volumes: - # - "./test/kafka-ssl:/kafka-ssl" environment: - "ENABLE_SSL=true" - "TRUSTSTORE_PASSWORD=test1234" - "KEYSTORE_PASSWORD=test1234" - "KEY_PASSWORD=test1234" - mock-submission-api: + mock-api: image: lsp-app:latest - container_name: mock-submission-api + container_name: mock-api volumes: - ".:/app" - command: run mock-submission-api + command: run mock-api lsp-app-install: build: @@ -106,12 +62,12 @@ services: - "3000:3300" links: - "kafka:kafka-host" - - "mock-submission-api:submission-api-host" + - "mock-api:mock-api-host" - "tc-informix:informix" depends_on: - "kafka" - "tc-informix" - - "mock-submission-api" + - "mock-api" lsp-app-test: image: lsp-app:latest diff --git a/docker/legacy-submission-processor/Dockerfile b/docker/legacy-submission-processor/Dockerfile index 4d7f06a..5439066 100755 --- a/docker/legacy-submission-processor/Dockerfile +++ b/docker/legacy-submission-processor/Dockerfile @@ -6,6 +6,7 @@ USER root RUN mkdir /app WORKDIR /home/informix +RUN sed -i '/jessie-updates/d' /etc/apt/sources.list RUN apt-get -qq update && apt-get -qq install -y \ wget gcc g++ make xz-utils python2.7 git diff --git a/docs/Validation.md b/docs/Validation.md deleted file mode 100755 index f04ee1d..0000000 --- a/docs/Validation.md +++ /dev/null @@ -1,109 +0,0 @@ -# Topcoder - Submission Legacy Processor Application - Verification ------------- - -Please note I still keep local verification document here but current codes/tests cannot run without setup database/test data/docker and you may check related Dockerfile to setup environment properly. -I would recommend you to verify in docker environment. - -## Setup Kafka - -- Download Kafka v2.1.0: https://kafka.apache.org/downloads -- Extract the downloaded file to a directory -- To enable SSL, copy the following lines to the end of `/config/server.properties` - - ``` - listeners=plaintext://localhost:9092,ssl://localhost:9093 - ssl.truststore.location= - ssl.truststore.password=test1234 - ssl.keystore.location= - ssl.keystore.password=test1234 - ssl.key.password=test1234 - ``` - - Replace `` to the absolute path to the file `legacy-sub-processor/test/kafka-ssl/server.truststore.jks` - Replace `` to the absolute path to the file `legacy-sub-processor/test/kafka-ssl/server.keystore.jks` - -- Example on my Windows PC: - - ``` - listeners=plaintext://localhost:9092,ssl://localhost:9093 - ssl.truststore.location=D:/Others/legacy-sub-processortest/kafka-ssl/server.truststore.jks - ssl.truststore.password=test1234 - ssl.keystore.location=D:/Others/legacy-sub-processor/test/kafka-ssl/server.keystore.jks - ssl.keystore.password=test1234 - ssl.key.password=test1234 - ``` - -## Start ZooKeeper - -- `cd ` -- For Linux: `bin/zookeeper-server-start.sh config/zookeeper.properties` -- For Windows: `bin\windows\zookeeper-server-start.bat config\zookeeper.properties` - -## Start Kafka - -- `cd ` -- For Linux: `bin/kafka-server-start.sh config/server.properties` -- For Windows: `bin\windows\kafka-server-start.bat config/server.properties` - -## Create Test Topics in Kafka - -- `cd ` -- For Linux: - ``` - bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.create - bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.update - ``` -- For Windows: - ``` - bin\windows\kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.create - bin\windows\kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.update - ``` - -## Run Unit Tests -Currently tests cannot run without database and test data so please check Verification_with_DB.md. - -- `cd legacy-sub-processor` -- `npm i` -- `npm test` - -The detailed test coverage report (html) is generated to `./coverage` directory - -## Manual Verification - -### Start the Mock Submission API - -- `cd legacy-sub-processor` -- `npm i` -- `npm run mock-submission-api` - -### Start the Application in Test Environment -Currently application cannot run without database and test data,docker so please check Verification_with_DB.md. - -- `cd legacy-sub-processor` -- For Linux: - ``` - export NODE_ENV=test - npm start - ``` -- For Windows: - ``` - set NODE_ENV=test - npm start - ``` - -### Send Test Events and Verify -Currently test events cannot run without database and test data,docker so please check Verification_with_DB.md. - -- `cd legacy-sub-processor` -- For Linux: `export NODE_ENV=test` -- For Windows: `set NODE_ENV=test` -- Run `npm run produce-test-event 0` and verify that the app doesn't consume this message (no log) -- Run `npm run produce-test-event 1` and verify that the app skips this message (log: `Skipped null or empty event`) -- Run `npm run produce-test-event 2` and verify that the app skips this message (log: `Skipped null or empty event`) -- Run `npm run produce-test-event 3` and verify that the app skips this message (log: `Skipped non well-formed JSON message: ...`) -- Run `npm run produce-test-event 4` and verify that the app skips this message (log: ` Skipped invalid event, reasons: "topic" is required ...`) -- Run `npm run produce-test-event 5` and verify that the app skips this message (log: `Skipped invalid event, reasons: "timestamp" must be...`) -- Run `npm run produce-test-event 6` and verify that the app skips this message (log: `Skipped event from topic wrong-topic`) -- Run `npm run produce-test-event 7` and verify that the app skips this message (log: `Skipped event from topic wrong-originator`) -- Run `npm run produce-test-event 8` and verify that the app makes call to the Submission API successfully (log: `Updated to the Submission API: id 111, ...`) and the Mock Submission API receives `PATCH /submissions/111` request with request body like `{"legacySubmissionId":93004}`. -- Run `npm run produce-test-event 9` and verify that the app process message successfully (log: `Successful Processing of MM challenge submission message`). diff --git a/docs/Verification_with_DB.md b/docs/Verification_with_DB.md deleted file mode 100755 index bdd3027..0000000 --- a/docs/Verification_with_DB.md +++ /dev/null @@ -1,138 +0,0 @@ -# Topcoder - Submission Legacy Processor - Online Review Integration - -## Requirement - -- Docker Engine >= 17.x -- Docker-compose >= 1.17 -- Database explorer for Informix (i.e DBeaver) - -## Note About Informix CSDK and Docker - -Getting and installing Informix CSDK is quite challenging. I can't find valid address to get this (except we're an active IBM customer). - -The only way to get this is by installing developer version Informix db i.e Informix Innovator-C. -This is not a simple task too. - -So instead of getting all those stuffs. I'm choosing to use IBM's docker image for Informix innovator-C. -And setting up node environment on top of it. -Kafka and other related service are also on docker environment. - - -## Build docker image for Kafka and Legacy Submission Processor - -```bash -cd -export DB_SERVER_NAME=informix -docker-compose build kafka -docker-compose build lsp-app -``` - -NOTE. All docker-compose command must be issued under ```legacy-sub-processor``` directory - -## Running Related Service - -```bash -docker-compose up -d tc-direct run-online-review kafka -``` -You should wait for a while until all service has been runned. - -## Edit ```hosts``` file -Add below to your hosts file: - -```bash - cockpit.cloud.topcoder.com - tcs.cloud.topcoder.com -``` -## Insert Test data to database - -```bash -cd -docker cp test/sql/test.sql iif_innovator_c:/ -docker exec -ti iif_innovator_c bash -c "source /home/informix/ifx_informixoltp_tcp.env && dbaccess - /test.sql" -docker-compose restart tc-direct run-online-review # only restart if you run test sql after tc-direct service started or you can run docker-compose up -d tc-informix at first and run related service after insert test data(IDGenerator in java application will cache next block start to generate sequences so have to work in this way) -``` - -## Create and setup new challenge -You may check logs using `docker-compose logs ` if meet any erros for example `docker-compose logs tc-direct`. - -Open [https://cockpit.cloud.topcoder.com/direct/launch/home](https://cockpit.cloud.topcoder.com/direct/launch/home) -Login as 'heffan/password' - -Create a dev challenge like Code. Fill all required fields, don't forget to pick billing account. -For start date choose a date on the PAST(say 3 days before). -[see screenshot](https://drive.google.com/file/d/1EK2F3tnXYCe3U1IjFz1msBoNCLaOPugI/view?usp=drivesdk) - -On last wizard click 'SUBMIT AND LAUNCH CHALLENGE'. After challenge has been created click 'Edit' button. - -See the challenge id on url like ```https://cockpit.cloud.topcoder.com/direct/contest/detail?projectId=30005520```. -30005520 is the challengeId (it might be different in different local setup) - -Open Online Review [http://cockpit.cloud.topcoder.com/review](http://cockpit.cloud.topcoder.com/review) -Open challenge that we've created before ```http://cockpit.cloud.topcoder.com/review/actions/ViewProjectDetails?pid={challengeId}``` or ```http://tcs.cloud.topcoder.com/review/actions/ViewProjectDetails?pid={challengeId}``` -Change pid to your challengeId above. -Click 'Edit project' button -On edit project page set: -- forum Id: 0 -- Add resource: - - Role: Submitter - - Name: user -- Save -[see screenshot](https://drive.google.com/file/d/13OELZLIbFPS1WdENGOcfSzC3TsTSJhPT/view?usp=drivesdk) - -You can stop direct-app and online review container, by issuing - -```bash -docker-compose stop tc-direct run-online-review -``` - -## Getting submission phase id -Open your database explorer, execute this query agains tcs_catalog database - -```sql -select project_phase_id from project_phase where project_id= and phase_type_id=2 -``` -Change challengeId with your challenge id above. The result is your submission phase id - -## Create Kafka topic - -```bash -docker exec -ti kafka bash -c "kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.create" -docker exec -ti kafka bash -c "kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic submission.notification.update" -``` - -## Installing Legacy Submission Proc. app requirements - -```bash -docker-compose up lsp-app-install -``` - -## Run Legacy Submission Proc. app -```bash -docker-compose up lsp-app -``` - -## Send Test data -From previous data setup I got: -- challengeId = 30005520 -- memberId = 132458 (user) -- submissionPhaseId = 95236 - -Let's send event to kafka: - -```bash -docker exec -ti lsp-app bash -c "npm run produce-test-event submission.notification.create 30005520 132458 95236" -``` - -or test with example event(valid event index is 0-8) -```bash -docker exec -ti lsp-app bash -c "npm run produce-test-event 0" -``` - -[screenshot](https://drive.google.com/file/d/1qfduKglVW0WbtqU4Oym9H7s4zpT87VZo/view?usp=drivesdk) - -You'll lsp-app log like: -[screenshot](https://drive.google.com/file/d/1nVjru_26f0A92FpXywBG9X910-Wc0fxN/view?usp=drivesdk) - -## Verify Database -Open your database explorer (**DBeaver** application, for instance). Connect to database tcs_catalog -Open table: upload, submission and resource_submission diff --git a/index.js b/index.js index 7545063..9e5c6e3 100755 --- a/index.js +++ b/index.js @@ -1,115 +1,15 @@ /** * The main entry of the application. */ -const logger = require('./src/common/logger') -require('./src/bootstrap') +require('legacy-processor-module/bootstrap') -const _ = require('lodash') -const Kafka = require('no-kafka') const config = require('config') -const util = require('util') -const healthcheck = require('topcoder-healthcheck-dropin') -const m2mAuth = require('tc-core-library-js').auth.m2m -const NewSubmissionService = require('./src/services/SubmissionService') -const IDGenerator = require('legacy-processor-module/IdGenerator') -const Informix = require('legacy-processor-module/Informix') +const KafkaConsumer = require('legacy-processor-module/KafkaConsumer') -logger.info(`KAFKA URL - ${config.KAFKA_URL}`) +const SubmissionService = require('./src/services/SubmissionService') -// db informix option -const dbOpts = { - database: config.DB_NAME, - username: config.DB_USERNAME, - password: config.DB_PASSWORD, - pool: { - min: 0, - max: 10 - } -} - -const db = new Informix(dbOpts) -const m2m = ((config.AUTH0_CLIENT_ID && config.AUTH0_CLIENT_SECRET) ? m2mAuth(_.pick(config, ['AUTH0_URL', - 'AUTH0_AUDIENCE', 'TOKEN_CACHE_TIME', 'AUTH0_PROXY_SERVER_URL' -])) : null) - -/** - * Handle the messages from Kafka. - * @param {Array} messages the messages - * @param {String} topic the topic - * @param {Number} partition the partition - * @private - */ -function handleMessages (messages, topic, partition) { - return Promise.each(messages, (m) => { - const messageValue = m.message.value ? m.message.value.toString('utf8') : null - const messageInfo = `message from topic ${topic}, partition ${partition}, offset ${m.offset}: ${messageValue}` - - logger.debug(`Received ${messageInfo}`) - - // Handle the event - return NewSubmissionService.handle(messageValue, db, m2m, idUploadGen, idSubmissionGen) - .then(() => { - logger.debug(`Completed handling ${messageInfo}`) - - // Commit offset - return consumer.commitOffset({ - topic, partition, offset: m.offset - }) - .catch(err => { - logger.error(`Failed to commit offset for ${messageInfo}: ${err.message}`) - logger.error(util.inspect(err)) - }) - }) - .catch(err => { - // Catch all errors thrown by the handler - logger.error(`Failed to handle ${messageInfo}: ${err.message}`) - logger.error(util.inspect(err)) - }) - }) -} - -const options = { connectionString: config.KAFKA_URL } -if (config.KAFKA_CLIENT_CERT && config.KAFKA_CLIENT_CERT_KEY) { - options.ssl = { cert: config.KAFKA_CLIENT_CERT, key: config.KAFKA_CLIENT_CERT_KEY } -} -const consumer = new Kafka.SimpleConsumer(options) - -const idUploadGen = new IDGenerator(db, config.ID_SEQ_UPLOAD) -const idSubmissionGen = new IDGenerator(db, config.ID_SEQ_SUBMISSION) - -// check if there is kafka connection alive -function check () { - if (!consumer.client.initialBrokers && !consumer.client.initialBrokers.length) { - return false - } - let connected = true - consumer.client.initialBrokers.forEach(conn => { - logger.debug(`url ${conn.server()} - connected=${conn.connected}`) - connected = conn.connected & connected - }) - return connected -} - -consumer - .init() - // consume configured topics - .then(() => { - healthcheck.init([check]) - const topics = [config.KAFKA_NEW_SUBMISSION_TOPIC, config.KAFKA_UPDATE_SUBMISSION_TOPIC] - _.each(topics, (tp) => { - consumer.subscribe(tp, { time: Kafka.LATEST_OFFSET }, handleMessages) - }) - }) - .catch((err) => logger.error(err)) +const consumer = KafkaConsumer.startConsumer(SubmissionService, [config.KAFKA_NEW_SUBMISSION_TOPIC, config.KAFKA_UPDATE_SUBMISSION_TOPIC]) if (process.env.NODE_ENV === 'test') { module.exports = consumer } -if (process.env.NODE_ENV === 'mock') { - // start mock server if NODE_ENV = mock - const { - mockServer - } = require('./test/mock-api') - mockServer.listen(config.MOCK_SERVER_PORT) - console.log(`mock api is listen port ${config.MOCK_SERVER_PORT}`) -} diff --git a/package-lock.json b/package-lock.json index 0768a74..dce0d23 100755 --- a/package-lock.json +++ b/package-lock.json @@ -984,9 +984,9 @@ } }, "ecdsa-sig-formatter": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz", - "integrity": "sha1-HFlQAPBKiJffuFAAiSoPTDOvhsM=", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", "requires": { "safe-buffer": "5.1.2" } @@ -2043,45 +2043,31 @@ } }, "jsonwebtoken": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.3.tgz", - "integrity": "sha1-d/UCHeBYtgWheD+hKD6ZgS5kVjg=", - "requires": { - "joi": "6.10.1", - "jws": "3.1.5", + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "requires": { + "jws": "3.2.2", + "lodash.includes": "4.3.0", + "lodash.isboolean": "3.0.3", + "lodash.isinteger": "4.0.4", + "lodash.isnumber": "3.0.3", + "lodash.isplainobject": "4.0.6", + "lodash.isstring": "4.0.1", "lodash.once": "4.1.1", - "ms": "2.0.0", - "xtend": "4.0.1" + "ms": "2.1.1", + "semver": "5.7.0" }, "dependencies": { - "hoek": { - "version": "2.16.3", - "resolved": "http://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", - "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" - }, - "isemail": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", - "integrity": "sha1-vgPfjMPineTSxd9lASY/H6RZXpo=" - }, - "joi": { - "version": "6.10.1", - "resolved": "http://registry.npmjs.org/joi/-/joi-6.10.1.tgz", - "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=", - "requires": { - "hoek": "2.16.3", - "isemail": "1.2.0", - "moment": "2.22.2", - "topo": "1.1.0" - } + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, - "topo": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/topo/-/topo-1.1.0.tgz", - "integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=", - "requires": { - "hoek": "2.16.3" - } + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" } } }, @@ -2106,12 +2092,12 @@ } }, "jwa": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz", - "integrity": "sha512-tBO/cf++BUsJkYql/kBbJroKOgHWEigTKBAjjBEmrMGYd1QMBC74Hr4Wo2zCZw6ZrVhlJPvoMrkcOnlWR/DJfw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", "requires": { "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.10", + "ecdsa-sig-formatter": "1.0.11", "safe-buffer": "5.1.2" } }, @@ -2139,11 +2125,11 @@ } }, "jws": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz", - "integrity": "sha512-GsCSexFADNQUr8T5HPJvayTjvPIfoyJPtLQBwn5a4WZQchcrPMPMAWcC1AzJVRDKyD6ZPROPAxgv6rfHViO4uQ==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", "requires": { - "jwa": "1.1.6", + "jwa": "1.4.1", "safe-buffer": "5.1.2" } }, @@ -2166,7 +2152,7 @@ } }, "legacy-processor-module": { - "version": "git+https://github.com/topcoder-platform/legacy-processor-module.git#fbaab0f97ad75cedd4c9afe71c2fee8064780196" + "version": "git+https://github.com/topcoder-platform/legacy-processor-module.git#54d5b44be6137e7e5bd05f479a721aded7a320b3" }, "levn": { "version": "0.3.0", @@ -2221,6 +2207,36 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, "lodash.kebabcase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", @@ -2400,7 +2416,8 @@ "moment": { "version": "2.22.2", "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", - "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" + "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=", + "optional": true }, "ms": { "version": "2.0.0", @@ -5454,16 +5471,17 @@ } }, "tc-core-library-js": { - "version": "github:appirio-tech/tc-core-library-js#10668ab7884c3b7578054e4862fb2e1bf3d2453b", + "version": "github:appirio-tech/tc-core-library-js#d16413db30b1eed21c0cf426e185bedb2329ddab", "requires": { "auth0-js": "9.8.2", "axios": "0.12.0", "bunyan": "1.8.12", - "jsonwebtoken": "7.4.3", + "jsonwebtoken": "8.5.1", "jwks-rsa": "1.3.0", "le_node": "1.8.0", "lodash": "4.17.11", - "millisecond": "0.1.2" + "millisecond": "0.1.2", + "request": "2.88.0" }, "dependencies": { "axios": { @@ -5737,7 +5755,8 @@ "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", + "dev": true }, "yallist": { "version": "2.1.2", diff --git a/package.json b/package.json index 390eee4..d316cc2 100755 --- a/package.json +++ b/package.json @@ -4,14 +4,14 @@ "description": "Topcoder - Legacy Submission Processor Application", "main": "index.js", "scripts": { - "start:docker": "npm --unsafe-perm install && node -r dotenv/config index", - "test:docker": "npm --unsafe-perm install && npm run test", + "start:docker": "node -r dotenv/config index", + "test:docker": "npm run test", "clean": "rm -rf node_modules && rm -rf coverage && rm -rf .nyc_output", "start": "node index", "lint": "standard", "lint:fix": "standard --fix", - "mock-submission-api": "node test/mock-submission-api", - "produce-test-event": "node test/produce-test-event", + "mock-api": "node node_modules/legacy-processor-module/mock/mock-api", + "produce-test-event": "node node_modules/legacy-processor-module/test/produce-test-event", "test": "npm run lint && nyc --reporter=html --reporter=text mocha test/tests.js --timeout 20000 --exit" }, "dependencies": { @@ -30,8 +30,7 @@ "no-kafka": "^3.2.10", "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6", "topcoder-healthcheck-dropin": "^1.0.2", - "winston": "^2.4.2", - "flatted": "^2.0.0" + "winston": "^2.4.2" }, "devDependencies": { "mocha": "^5.2.0", @@ -51,7 +50,6 @@ }, "nyc": { "exclude": [ - "src/common/logger.js", "test/*.js" ] } diff --git a/src/bootstrap.js b/src/bootstrap.js deleted file mode 100755 index b176ebb..0000000 --- a/src/bootstrap.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * Init app - */ - -global.Promise = require('bluebird') diff --git a/src/common/constant.js b/src/common/constant.js deleted file mode 100755 index 8715d8c..0000000 --- a/src/common/constant.js +++ /dev/null @@ -1,49 +0,0 @@ - -const SUBMISSION_TYPE = { - 'Contest Submission': { id: 1, roleId: 1 }, - 'Specification Submission': { id: 2, roleId: 17 }, - 'Checkpoint Submission': { id: 3, roleId: 1 }, - 'Studio Final Fix Submission': { id: 4, roleId: 1 } -} - -const UPLOAD_TYPE = { - 'Submission': 1, - 'Final Fix': 3 -} - -const UPLOAD_STATUS = { - 'Active': 1, - 'Deleted': 2 -} - -const SUBMISSION_STATUS = { - 'Active': 1, - 'Deleted': 5 -} - -const PHASE_TYPE = { - 'Submission': 2, - 'Final Fix': 9, - 'Specification Submission': 13 -} - -const CHALLENGE_TYPE = { - 'Component': 1, - 'Application': 2, - 'Studio': 3 -} - -const COMPONENT_STATE = { - // could add more from https://github.com/appirio-tech/tc1-tcnode/blob/master/tc-common/src/main/java/com/topcoder/web/common/model/algo/ComponentState.java - NOT_CHALLENGED: 130 // Submitted -} - -module.exports = { - SUBMISSION_TYPE, - SUBMISSION_STATUS, - UPLOAD_TYPE, - UPLOAD_STATUS, - PHASE_TYPE, - CHALLENGE_TYPE, - COMPONENT_STATE -} diff --git a/src/common/logger.js b/src/common/logger.js deleted file mode 100755 index b14055a..0000000 --- a/src/common/logger.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Configure the logger. - */ -const config = require('config') -const winston = require('winston') - -// Initialize the logger -const logger = new winston.Logger({ - level: config.LOG_LEVEL, - transports: [ - new winston.transports.Console() - ] -}) - -module.exports = logger diff --git a/src/services/SubmissionService.js b/src/services/SubmissionService.js index 79e9a54..60e2e5b 100755 --- a/src/services/SubmissionService.js +++ b/src/services/SubmissionService.js @@ -1,78 +1,30 @@ /** - * The service to handle new submission events. + * The service to handle new submission events for non-MM challenge. */ -const _ = require('lodash') -const Axios = require('axios') const config = require('config') -const Flatted = require('flatted') const Joi = require('joi') -const logger = require('../common/logger') -const { handleSubmission } = require('legacy-processor-module/AllSubmissionService') -// Custom Joi type -Joi.id = () => Joi.number().integer().positive().required() +const logger = require('legacy-processor-module/common/logger') +const Schema = require('legacy-processor-module/Schema') +const LegacySubmissionIdService = require('legacy-processor-module/LegacySubmissionIdService') // The event schema to validate events from Kafka -const eventSchema = Joi.object().keys({ - topic: Joi.string().required(), - originator: Joi.string().required(), - timestamp: Joi.date().required(), - 'mime-type': Joi.string().required(), - payload: Joi.object().keys({ - id: Joi.alternatives().try(Joi.id(), Joi.string().uuid()).required(), - resource: Joi.alternatives().try(Joi.string().valid('submission'), Joi.string().valid('review')), - challengeId: Joi.id().optional(), - memberId: Joi.id().optional(), - submissionPhaseId: Joi.id().optional(), - url: Joi.string().uri().optional(), - type: Joi.string().optional(), - legacySubmissionId: Joi.number().integer().positive().optional(), - isExample: Joi.number().integer().valid(0, 1).optional(), - typeId: Joi.string().optional(), - score: Joi.number().min(0).max(100).optional(), - metadata: Joi.object().keys({ - testType: Joi.string().required() - }).optional() - }).required().unknown(true) +const eventSchema = Schema.createEventSchema({ + id: Joi.sid().required(), + resource: Joi.resource(), + challengeId: Joi.id().required(), + memberId: Joi.id().required(), + submissionPhaseId: Joi.id().required(), + type: Joi.string().required(), + url: Joi.string().uri().optional(), + legacySubmissionId: Joi.id().optional() }) -/** - * Get the subtrack for a challenge. - * @param {string} challengeId - The id of the challenge. - * @returns {string} The subtrack type of the challenge. - */ -async function getSubTrack (challengeId) { - try { - // attempt to fetch the subtrack - const result = await Axios.get(config.CHALLENGE_INFO_API.replace('{cid}', challengeId)) - // use _.get to avoid access with undefined object - return _.get(result.data, 'result.content[0].subTrack') - } catch (err) { - if (err.response) { // non-2xx response received - logger.error(`Challenge Details API Error: ${Flatted.stringify({ - data: err.response.data, - status: err.response.status, - headers: err.response.headers - }, null, 2)}`) - } else if (err.request) { // request sent, no response received - // may throw such error Converting circular structure to JSON if use native JSON.stringify - // https://github.com/axios/axios/issues/836 - logger.error(`Challenge Details API Error (request sent, no response): ${Flatted.stringify(err.request, null, 2)}`) - } else { - logger.error(util.inspect(err)) - } - } -} - /** * Handle new submission message. * @param {String} value the message value (JSON string) - * @param {Object} db the informix database - * @param {Object} m2m the m2m auth - * @param {IDGenerator} idUploadGen IDGenerator instance of upload - * @param {IDGenerator} idSubmissionGen IDGenerator instance of submission */ -async function handle (value, db, m2m, idUploadGen, idSubmissionGen) { +async function handle (value) { if (!value) { logger.debug('Skipped null or empty event') return @@ -93,10 +45,7 @@ async function handle (value, db, m2m, idUploadGen, idSubmissionGen) { } // Validate event - const validationResult = Joi.validate(event, eventSchema, { abortEarly: false, stripUnknown: true }) - if (validationResult.error) { - const validationErrorMessage = _.map(validationResult.error.details, 'message').join(', ') - logger.debug(`Skipped invalid event, reasons: ${validationErrorMessage}`) + if (!Schema.validateEvent(event, eventSchema)) { return } @@ -116,21 +65,53 @@ async function handle (value, db, m2m, idUploadGen, idSubmissionGen) { return } - // will convert to Date object by Joi and assume UTC timezone by default - const timestamp = validationResult.value.timestamp.getTime() - - // attempt to retrieve the subTrack of the challenge - const subTrack = await getSubTrack(event.payload.challengeId) + // Attempt to retrieve the subTrack of the challenge + const subTrack = await LegacySubmissionIdService.getSubTrack(event.payload.challengeId) logger.debug(`Challenge ${event.payload.challengeId} get subTrack ${subTrack}`) - const challangeSubtracks = config.CHALLENGE_SUBTRACK.split(',').map(x => x.trim()) - - // process all challenge submissions - if (subTrack && challangeSubtracks.includes(subTrack)) { - await handleSubmission(Axios, event, db, m2m, idUploadGen, idSubmissionGen, timestamp, true) - } else { - await handleSubmission(Axios, event, db, m2m, idUploadGen, idSubmissionGen, timestamp, false) - logger.debug(`Successful Processing of non MM challenge submission message: ${JSON.stringify(event, null, 2)}`) + + const mmChallangeSubtracks = config.MM_CHALLENGE_SUBTRACK.split(',').map(x => x.trim()) + + // Skip MM challenge submissions + if (!subTrack || mmChallangeSubtracks.includes(subTrack)) { + logger.debug(`Skipped event for subTrack: ${subTrack}`) + return } + + if (event.topic === config.KAFKA_NEW_SUBMISSION_TOPIC) { + // Handle new submission + const patchObject = await LegacySubmissionIdService.addSubmission( + event.payload.id, + event.payload.challengeId, + event.payload.memberId, + event.payload.submissionPhaseId, + event.payload.url, + event.payload.type + ) + + logger.debug(`Patched to the Submission API: id ${event.payload.id}, patch: ${JSON.stringify(patchObject)}`) + } else if (event.payload.url) { + // We only concerns updating url, + // while the update event may not be caused by url update + + let legacySubmissionId = event.payload.legacySubmissionId + if (!legacySubmissionId) { + // In case legacySubmissionId not present, try to get it from submission API + const submission = await LegacySubmissionIdService.getSubmission(event.payload.id) + legacySubmissionId = submission.legacySubmissionId || 0 + } + + await LegacySubmissionIdService.updateUpload( + event.payload.challengeId, + event.payload.memberId, + event.payload.submissionPhaseId, + event.payload.url, + event.payload.type, + legacySubmissionId + ) + logger.debug(`Submission url updated, legacy submission id : ${legacySubmissionId} with url ${event.payload.url}`) + } + + logger.debug(`Successful Processing of non MM challenge submission message: ${JSON.stringify(event, null, 2)}`) } module.exports = { diff --git a/test/kafka-ssl/client.crt b/test/kafka-ssl/client.crt deleted file mode 100755 index cefd3a1..0000000 --- a/test/kafka-ssl/client.crt +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIChTCCAe4CCQDzCm31Xv0idjANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJB -VTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0 -cyBQdHkgTHRkMB4XDTE2MDQyNzEzMjMxMFoXDTIwMDEyMjEzMjMxMFowRTELMAkG -A1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0 -IFdpZGdpdHMgUHR5IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB -AK7bkeOhP8rla6Z7mHBN+Cv/4YqPwlBM6CvXJ3C546MYbF8q6X6QTX0tLD4DhGrT -1lPwEnmYVPe1Thy2siv8/YU6RJNmY4G5QuiX4dU5s8Nb2cidgcoxou5S/7+JS4K+ -HVOR0sEKCrRtAorrbMNMYUZLWUzj7TX2ridkRgaiXcCzofSje4zQp5q8uDfxrNIz -jLSGD0dn7IogV4upysa+D1/uev6x+tpR53mF1stSsyLhqsyF+MuFvNc79pt4BTe/ -AKdD8iAxVibr4RZgwUGLbrZ2LprpHOaWHyGJu0hv/W0PduJwkF/HVD9JWVU8VZo4 -gPjaBTi91kxGHl8Sy6VAau8CAwEAATANBgkqhkiG9w0BAQUFAAOBgQDfy8A8zFTa -YMAjqVTlGEEG1Eocjo4KTU9W2EiJ3arutZtLn06qOm8Z+ZBqQnlzirada+oB6R1+ -JqRRiHWcLGv2BM7P7CGDccHYSBSEvCt3iK4wL9XjiZVGwlcz+HvEcqwh//Nazmj/ -dkdvntxGJapiogKQHkrN/s7N/qH0/60ftA== ------END CERTIFICATE----- diff --git a/test/kafka-ssl/client.key b/test/kafka-ssl/client.key deleted file mode 100755 index 3e44cc8..0000000 --- a/test/kafka-ssl/client.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEArtuR46E/yuVrpnuYcE34K//hio/CUEzoK9cncLnjoxhsXyrp -fpBNfS0sPgOEatPWU/ASeZhU97VOHLayK/z9hTpEk2ZjgblC6Jfh1Tmzw1vZyJ2B -yjGi7lL/v4lLgr4dU5HSwQoKtG0Ciutsw0xhRktZTOPtNfauJ2RGBqJdwLOh9KN7 -jNCnmry4N/Gs0jOMtIYPR2fsiiBXi6nKxr4PX+56/rH62lHneYXWy1KzIuGqzIX4 -y4W81zv2m3gFN78Ap0PyIDFWJuvhFmDBQYtutnYumukc5pYfIYm7SG/9bQ924nCQ -X8dUP0lZVTxVmjiA+NoFOL3WTEYeXxLLpUBq7wIDAQABAoIBAQCq0Xdg74rZVGxo -1D8kHxc9LJkR+sSyG5+IDITMG9zk3JwqEErQSHpaugGJh3gZwF6V22bBAO6omqb3 -aAcA8AJe34BUmubEuM5DWPTWj6ssQxOrZyt+8iSgO9b6L07kJ4OQu1kvGfdBMWkV -e03iMECrIjrX4aY/XH/fnZbHLmD2OSfsmVwqbxodO8Zj5ewAcvGe53bsW5G0ngMY -36tAE0AR+tQAEXonlTeu7SUQJfknDl/kghQxGJxlfU7S10YmWDQk1UhxIFJM7crO -gm2nrL1ciWP6LB8D+kcNmAINDsnMjmONW9bQhp8z5QOD03QysvzQrVnTLAYJbcLD -NuHVeNOhAoGBAODoJ87rZoEh8LFuWDbGx5jN8DP2zKKobzFQW2KVj+93tnuRF+kK -J8Ydo4CcQiEznCpyLmlyM/ekPiLA/hQ7X6ejNU5+qM3lB8jNzRJlw/sA4mFJfYzh -U5GrTgB8g9Q8NcmHUBKLeZthjYMEJi9C5WOeJj5KiCQ8YN5w5bLczdo/AoGBAMcI -FmljNDUc/pHiAF5X+XITc/IRQWFyyfpBhFjc1iPBvbCWwM2Ca0UT17uFsovw0Rt/ -Y4p1PPjIxFGn1pBo+du1b4wZChFoN4ORV4AAwJMGYZ0vYk4erXtmnmI2TxT5A3xX -s9yjRX+IXhfdpvIVUdQ97pLtVrLocUdU8dR1SGNRAoGAGiWDM0AUq6CJfecpJD0Z -yT7v1Oq1QZe5TY9dAGoI0LsnINhuYi5HD3Y0ougHnBqG5jxd/u5C8mBKxPmQ0ENS -zIdh1B1PfJhKvmKGm8Pu88hXiR3lFbLAZ2f16oKPROY3DpXHjlBes9y0ee3KjqYF -Sv6Aza8WgrfuPw369j9LQzsCgYBU5opI4lx+26NsL2/gzr5Ffy7Sb7HoE8M80X3X -OjzOe/KixWvxPlTr3o8EGwAS2eMZS7n2chRUO7Ai9Ol+KImMw1SV+ohk7IPhx7n/ -jFKZZPt2xaO1lziBj0C4vFn3pFFsVS0QTUV0JYOdwptYYOfLFbATVNLK9oR73Sxb -aLw8QQKBgBKrYD3lFyeCfsAfGxCM5fcBa2GkzuMQeQxVbeqtcBQVnxwwkKi3ONtP -+7O5p/B8KgFlqQC9wSdEaQUsGDBzczLnzeTmrplN6utqRd1jnu7E+BDqmEtjcsNL -yUOUHVqK9vIoysrPhcxm3I7laGbqaPUSUhSt0Tiw1ngweTDhtlPH ------END RSA PRIVATE KEY----- diff --git a/test/kafka-ssl/server.keystore.jks b/test/kafka-ssl/server.keystore.jks deleted file mode 100755 index 0578c8a08e884a69839d1474db631a69f54beb87..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3470 zcmeHKc{tQ-8~*)fvyNRuWX- zNK_F%KNqx;;T-H87plS z_e~B~sTJi;j+U_f5{eiWW-4jFR@h#H3{l@SUrMsk-><{0&{Y z`y7Vmd5So(C-bT%UUjlgQTHU{zm)}?4c>;x}*3yPl&$0tcsvO5y$^$L6LQdgK$b!c?#>Nv>Q_?Tm4MRs)UZH7Y zpGtDIyF5OAQX-)mF$w0THwvV`2tA5WgqD3+`rG1LXTmLP!P||;+Q&BpoXReq9aL}DLe(r}PF-ja7y~dBN#!BM^YX*FQV9u- zBqBx3@xyqm&pn}S#fQhYiN^PAp-S-2=hx+Xs=;PlPU_C5y*7rA6cmZe?XK7)Q`PN+ zh$5M~StaCA!cWw9NNw_0E7us!Q9IEqs&(~I=ym0u7@=1OTaB;DB;QJ2O-P<~f4L2D zPS;nbnoYDbzg>Lx;`u$`F4q{l`iwI!ie&zF+#S{Tdu2FtLk#;k^^TdBhAM=appunw z6GHu#ulHP<{O3B9v`@(Fy%$)tAf`OdrN*Mqg(;Mk*|@chh~BU&>dUU`UVzhQ(~k?U z7B99fgiYLvHqA1>b-_fMtfo`*G6va{YO=MzlkiZ)Rqt} z$Als_daVklZuBin(cg9RAnQiT*PMD?y;V9=>VMmj!Ld6W)i=+ zd?2vT`;k9!Na#xpA3|*`RY0S2z^TGl;su%WhE3q@Dj2GGeA{8?Bkz~{44@@?H2<3@~pv@vsk)3C=8&NO%8g~Ua!c?oM=>}IbV9)fkV3ZxgChtv%$F<#z?WufF(}zKBKs> zNntU0GjD>;&^hC-L}jk^qfsY&64}Qxd03~CQChuSrR|W`%0MCKhEhYMdy(19N^t37 zSO{%-A0eUssc`YQlAL#>7(X`Pjn>VhMh|8sy{=y6O-pb5{YX}6>#^Hbu#y?1{xjUf z0-@;Cgw$MZ%bW-xlMyND@;1B>X#~}izvXD)4AlaDo4%Srk7KZoJlevG2kfC7sPgWd{-~Y*tW4!uI!ioR1&*J9*SbBxjD0Yj=?ffZtaM3T*s4Iz=E3BK zYW2ED%%leL_h-y!?+K(lO)@|Dn-7dJFBLAIEAU`i0z(!(Nr*Z!aJ=t1*3$i;Z3x3~ zLF4{uWz^$NzB6|QgXRFiTcpvl+N1~HMpZA1@GJ|=S{!fExstoPo16Tzi2a&ZsELJ+ z#vH=EPV+77O!Wa*yu07F(59=#{#oq0XzHa1_oW^@m9&hg_^$bX>ifF3SFDBfnzVlr zjGXgXR-yl8qW>fT`7de58DM{u_VpBsz>2L+=I;)Ik4y=tP!Cc5gYZlK72*3EBKS8% z=x+%8PXtN?RerqZx&=rCMS(S35S9pnKslc-H$ME@U{p_m*<+#zdq>kNmJD&J&U_x_ zgUUNPyvpNJXP?3V^=i6FsFLb8olo`{M!%oFPE%o>4+WdNXR28yb9z^n_U{j&r~g&*^>8}O*=&ZREpSFdu8 z`ZP2@dq;i$d@&_hhfXhf=@ORLrO6RPui#YqD8Bs%80?%6ZrAAEEf+2z3k}}PCN^Lc zY<3)Gflq6pv|5Alx+Sf4wwJu9rla=t{gZoCY6HYKO15*A0zD+%dj>N~N_`7VzPpeg8Tv!pTUYEqoi2k7k#G3-S$d#!pT(MAk0hS! zN^|ikf5+~=c=ng)&gv6{A|rZge)hgWstta$%stii;Ae06hBFdpUMRjY%(lh5Tx@_F z-QD8r!RIK~+7i)Wuz|a2%u9j7r diff --git a/test/kafka-ssl/server.truststore.jks b/test/kafka-ssl/server.truststore.jks deleted file mode 100755 index 6d6a5d597c25b49a971959965afc0f2c6ba305c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 755 zcmezO_TO6u1_mY|W(3o0$%#ez`6WPZNch9OCm2{G^h^ybfhx8bG%;-eV#x)}OpHuS zoD7|J*cNIgEdFA^%f_kI=F#?@mywZ`mBGN(klTQhjX9KsO_<3s)KJ(!5X9jS<_gZw zP1Ox9Ni0bLGq-T~CD+H8OD)^M77|4n98k!lH7?~Ry z8yOm!M~U+q85kHE89}+!vZir9viliX8JHV;84MabnHn1z-mN>imP7kuu&!T)B)hA{ zfxJKVGB@UaX|yE41O$ zd1SFC+MpC9t;~{Vkkf!w!9vd^?oOwzRi1VagIl=ufN}OzeWM=klUV9+#PQHj+f$iw%VCH zcmJjn(beHhD_GmAxc4P?%(iK%;&_iKuQo7Mz_$Hk?_eZnH|A`QYm zRI%;*Y|``nhuTb=YhR`2E@_+h{)V5Nin)J~Slklc@V_roBhNMndEO1rOKk@LZ+QMK diff --git a/test/mock-api.js b/test/mock-api.js deleted file mode 100755 index 2a0eec6..0000000 --- a/test/mock-api.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * The mock server for challenge api - */ -const http = require('http') -const send = require('http-json-response') -const logger = require('../src/common/logger') - -// only include used properties and you may check real response from https://api.topcoder-dev.com/v4/challenges?filter=id=30005521 -const getChallenge = (subTrack) => ({ - result: { - content: [{subTrack}] - } -}) -const responses = { - '/challenges?filter=id=30005521': getChallenge('DEVELOPMENT'), - '/challenges?filter=id=30005540': getChallenge('ARCHITECTURE'), - '/challenges?filter=id=30005530': getChallenge('DEVELOPMENT'), - '/challenges?filter=id=30054163': getChallenge('DEVELOP_MARATHON_MATCH'), - '/challenges?filter=id=30054378': getChallenge('DEVELOP_MARATHON_MATCH'), - '/challenges?filter=id=60005521': getChallenge('') -} - -const mockServer = http.createServer((req, res) => { - logger.debug(`${req.method} ${req.url}`) - if (req.method === 'GET' && Object.keys(responses).includes(req.url)) { - return send(res, 200, responses[req.url]) - } else if (req.method === 'GET' && req.url.match(/^\/challenges\?filter=id=\d+$/)) { - // default to mock as mm challenge - return send(res, 200, getChallenge('DEVELOP_MARATHON_MATCH')) - } else { - // 404 for other routes - res.statusCode = 404 - res.end('Not Found') - } -}) - -module.exports = { - mockServer -} diff --git a/test/mock-submission-api.js b/test/mock-submission-api.js deleted file mode 100755 index 3c2ad69..0000000 --- a/test/mock-submission-api.js +++ /dev/null @@ -1,168 +0,0 @@ -/** - * The mock Submission API. - */ -const config = require('config') -const http = require('http') -const path = require('path') -const fs = require('fs') -const send = require('http-json-response') -const logger = require('../src/common/logger') - -// The good sample submission -const sampleSubmission = { - id: 111, - challengeId: 30005521, - memberId: 124916, - resource: 'submission', - url: 'http://content.topcoder.com/some/path', - type: 'Contest Submission', - submissionPhaseId: 95245 -} - -// The good sample submission -const sampleUpdateSubmission = { - id: 112, - challengeId: 30005521, - memberId: 124916, - resource: 'submission', - url: 'http://content.topcoder.com/some/path/updated', - type: 'Contest Submission', - submissionPhaseId: 95245 -} - -// The good final fix sample submission -const sampleFinalFixSubmission = { - id: 113, - challengeId: 30005540, - memberId: 132458, - resource: 'submission', - url: 'http://content.topcoder.com/some/path', - type: 'Contest Submission', - submissionPhaseId: 95308 -} - -// The good studio sample submission -const sampleStudioSubmission = { - id: 114, - challengeId: 30005530, - memberId: 124764, - resource: 'submission', - url: 'http://content.topcoder.com/some/path', - type: 'Contest Submission', - submissionPhaseId: 95288 -} - -// The good not allow multiple submission sample submission -const sampleNotAllowMultipleSubmission = { - id: 115, - challengeId: 30005540, - memberId: 132458, - resource: 'submission', - url: 'http://content.topcoder.com/some/path', - type: 'Contest Submission', - submissionPhaseId: 95301 -} - -// The good no challenge properties sample submission -const sampleNoChallengePropertiesSubmission = { - id: 116, - challengeId: 30005530, - memberId: 132458, - resource: 'submission', - url: 'http://content.topcoder.com/some/path', - type: 'Contest Submission', - submissionPhaseId: 95308 -} - -// The good sample legacy update submission -const sampleLegacyUpdateSubmission = { - id: 117, - challengeId: 30005521, - memberId: 124916, - resource: 'submission', - url: 'http://content.topcoder.com/some/path/legacyupdated', - type: 'Contest Submission', - submissionPhaseId: 95245, - legacySubmissionId: 93000, - updated: '2018-02-16T00:00:00' -} - -const normalSubmission = { - 'resource': 'submission', - 'id': 'cfdbc0cf-6437-433e-8af1-c56f317f2afd', - 'type': 'Contest Submission', - 'url': 'https://topcoder-dev-submissions.s3.amazonaws.com/cfdbc0cf-6437-433e-8af1-c56f317f2afd', - 'memberId': 124916, - 'challengeId': 30005521, - 'created': '2018-07-31T17:05:17.835Z', - 'updated': '2018-07-31T17:05:17.835Z', - 'createdBy': 'callmekatootie', - 'updatedBy': 'callmekatootie', - 'submissionPhaseId': 95245, - 'isFileSubmission': true, - 'fileType': 'zip', - 'filename': 'Photo on 7-30-18 at 11.47 AM #2.jpg' -} - -const responses = { - '/submissions/111': sampleSubmission, - '/submissions/112': sampleUpdateSubmission, - '/submissions/113': sampleFinalFixSubmission, - '/submissions/114': sampleStudioSubmission, - '/submissions/115': sampleNotAllowMultipleSubmission, - '/submissions/116': sampleNoChallengePropertiesSubmission, - '/submissions/117': sampleLegacyUpdateSubmission, - '/submissions/cfdbc0cf-6437-433e-8af1-c56f317f2afd': normalSubmission -} -const codePath = '/submissionTexts/cfdbc0cf-6437-433e-8af1-c56f317f2afd' -const submissionPath = path.join(__dirname, './test_files/Test.java') -const submissionText = fs.readFileSync(submissionPath) -const mockSubmissionApi = http.createServer((req, res) => { - logger.debug(`${req.method} ${req.url}`) - // PUT /submissions/:id - if ((req.method === 'PUT' || req.method === 'PATCH') && - (req.url.match(/^\/submissions\/[1-9]\d*$/) || - req.url.match(/^\/submissions\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/gi))) { - let body = '' - req.on('data', chunk => { - // Convert Buffer to string - body += chunk.toString() - }) - req.on('end', () => { - logger.debug(body) - - // Always return 200 response - res.statusCode = 200 - res.end() - }) - } else if (req.method === 'GET' && req.url.includes(codePath)) { - // will mock download file request - res.writeHead(200, {'content-type': 'application/text'}) - fs.createReadStream(submissionPath).pipe(res) - } else if (req.method === 'GET' && - (req.url.match(/^\/submissions\/[1-9]\d*$/) || - req.url.match(/^\/submissions\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/gi))) { - return send(res, 200, responses[req.url] || normalSubmission) - } else { - // 404 for other routes - res.statusCode = 404 - res.end('Not Found') - } -}) -if (!module.parent) { - const port = config.MOCK_SUBMISSION_API_PORT || 3000 - mockSubmissionApi.listen(port) - console.log(`mock submission api is listen port ${port}`) -} -module.exports = { - sampleSubmission, - sampleUpdateSubmission, - sampleFinalFixSubmission, - sampleStudioSubmission, - sampleNotAllowMultipleSubmission, - sampleNoChallengePropertiesSubmission, - sampleLegacyUpdateSubmission, - mockSubmissionApi, - submissionUrl: `${config.SUBMISSION_API_URL}${codePath}`, - submissionText -} diff --git a/test/produce-test-event.js b/test/produce-test-event.js deleted file mode 100755 index c8c2589..0000000 --- a/test/produce-test-event.js +++ /dev/null @@ -1,155 +0,0 @@ -/** - * The script to send test events to Kafka. - */ -// Make sure that we don't send test events in production environment by mistake -// will load same NODE_ENV in docker container and still use test as default -process.env.NODE_ENV = process.env.NODE_ENV || 'test' - -const Kafka = require('no-kafka') -const config = require('config') -const _ = require('lodash') -const util = require('util') -const logger = require('../src/common/logger') -const { submissionUrl } = require('./mock-submission-api') - -// The good sample message -const sampleMessage = { - topic: config.KAFKA_NEW_SUBMISSION_TOPIC, - originator: config.KAFKA_NEW_SUBMISSION_ORIGINATOR, - timestamp: '2018-02-16T00:00:00', - 'mime-type': 'application/json', - payload: { - id: 111, - submissionId: 111, - challengeId: 30005521, - memberId: 124916, - resource: 'submission', - url: 'https://topcoder-dev-submissions.s3.amazonaws.com/cfdbc0cf-6437-433e-8af1-c56f317f2afd', - type: 'Contest Submission', - submissionPhaseId: 95245 - } -} - -const sampleMMMessage = { - topic: config.KAFKA_NEW_SUBMISSION_TOPIC, - originator: config.KAFKA_NEW_SUBMISSION_ORIGINATOR, - timestamp: '2018-02-16T00:00:00', - 'mime-type': 'application/json', - payload: { - id: 113, - challengeId: 30054163, - memberId: 132458, - resource: 'submission', - url: submissionUrl, - type: 'Contest Submission', - submissionPhaseId: 95308, - isExample: 0 - } -} - -// The test events -const events = [ - // Different topic, not consumed by the app - { topic: 'different-topic', message: { value: 'message' } }, - - // Null message - { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: null } }, - - // Empty message - { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: '' } }, - - // Not well-formed JSON string - { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: 'abc' } }, - - // Empty JSON string - { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: '{}' } }, - - // Invalid timestamp and payload - { - topic: config.KAFKA_NEW_SUBMISSION_TOPIC, - message: { - value: JSON.stringify(_.merge({}, sampleMessage, { - timestamp: 'invalid date', - payload: { - id: 0, - challengeId: 'a', - memberId: 'b', - url: 'invalid url', - resource: 'submission', - type: null - } - })) - } - }, - - // Wrong message topic - { - topic: config.KAFKA_NEW_SUBMISSION_TOPIC, - message: { - value: JSON.stringify(_.merge({}, sampleMessage, { - topic: 'wrong-topic' - })) - } - }, - - // Wrong message originator - { - topic: config.KAFKA_NEW_SUBMISSION_TOPIC, - message: { - value: JSON.stringify(_.merge({}, sampleMessage, { - originator: 'wrong-originator' - })) - } - }, - - // Good message - { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleMessage) } }, - // Good mm challenge message - { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleMMMessage) } } -] - -// Init the producer and send the test events -const producer = new Kafka.Producer({ - connectionString: config.KAFKA_URL, - ssl: { - cert: config.KAFKA_CLIENT_CERT, - key: config.KAFKA_CLIENT_CERT_KEY - } -}) - -// Get event id from argument -// npm run produce-test-event 0 -let eventId - -if (process.argv.length > 4) { - const isMM = process.argv[2] === 'mm' - let message = isMM ? sampleMMMessage : sampleMessage - // custom event - message.topic = isMM ? config.KAFKA_NEW_SUBMISSION_TOPIC : process.argv[2] - message.payload.challengeId = Number(process.argv[3]) - message.payload.memberId = Number(process.argv[4]) - message.payload.submissionPhaseId = Number(process.argv[5]) - if (typeof process.argv[6] !== 'undefined') { - if (isMM) { - message.payload.isExample = Number(process.argv[6]) - } else { - message.payload.legacySubmissionId = Number(process.argv[6]) - } - } - eventId = 9 - events[eventId] = { topic: message.topic, message: { value: JSON.stringify(message) } } -} else { - eventId = Number(process.argv[2]) -} - -producer.init() - .then(() => producer.send(events[eventId])) - .then((results) => { - logger.debug(`Produced event ${util.inspect(events[eventId])}`) - logger.debug(results) - }) - .then(() => process.exit(0)) - .catch((err) => { - logger.error(err) - process.exit(1) - }) diff --git a/test/sql/prepare.sql b/test/sql/prepare.sql deleted file mode 100755 index b269426..0000000 --- a/test/sql/prepare.sql +++ /dev/null @@ -1,3 +0,0 @@ -UPDATE informixoltp:long_component_state SET points=NULL, status_id=NULL, submission_number=NULL, example_submission_number=NULL WHERE long_component_state_id=3001 AND round_id=2001 AND component_id=2001 AND coder_id=132458; -DELETE FROM informixoltp:long_submission WHERE long_component_state_id=3001; -UPDATE upload SET url='http://content.topcoder.com/some/path' WHERE upload_id=60000; \ No newline at end of file diff --git a/test/sql/test.sql b/test/sql/test.sql index 876fa19..514edd9 100755 --- a/test/sql/test.sql +++ b/test/sql/test.sql @@ -1,188 +1,11 @@ - -database common_oltp; -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (132456, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (20, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (21, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (132457, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (132458, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124764, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124766, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124772, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124776, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124834, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124835, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124836, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124852, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124853, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124856, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124857, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124861, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124916, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (22770213, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (22719217, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (22719218, 21193, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (22873364, 21193, current, current); - - -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (132458, 20704, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124764, 20704, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124766, 20704, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124776, 20704, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (132458, 20703, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124764, 20703, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124766, 20703, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (124776, 20703, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (132456, 20703, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (132456, 20794, current, current); -INSERT INTO user_terms_of_use_xref(user_id, terms_of_use_id, create_date, modify_date) VALUES (22770213, 20794, current, current); - - -update terms_of_use set url='http://example.com/'; - -update security_groups set challenge_group_ind = 1 where group_id in (2000115, 10, 15471940, 14); - -database corporate_oltp; -INSERT INTO informix.tc_direct_project (project_id,name,description,project_status_id,user_id, create_date,modify_date) VALUES ( -1245,'Project 1','Project 1 descr',1,132456, current, current); -INSERT INTO informix.tc_direct_project (project_id,name,description,project_status_id,user_id, create_date,modify_date) VALUES ( -1246,'Project 2','Project 2 descr',1,132456, current, current); -INSERT INTO informix.direct_project_account (direct_project_account_id,project_id,billing_account_id) VALUES ( -1,1245, 1); -INSERT INTO informix.direct_project_account (direct_project_account_id,project_id,billing_account_id) VALUES ( -21,1245, 3); -INSERT INTO informix.direct_project_account (direct_project_account_id,project_id,billing_account_id) VALUES ( -22,1245,2); -INSERT INTO informix.direct_project_account (direct_project_account_id,project_id,billing_account_id) VALUES ( -3,1246, 3); -INSERT INTO informix.user_permission_grant (user_permission_grant_id, user_id, resource_id, permission_type_id, is_studio) -VALUES(100, 132456, 1246, 3, 0); -INSERT INTO informix.user_permission_grant (user_permission_grant_id, user_id, resource_id, permission_type_id, is_studio) -VALUES(101, 132456, 1245, 3, 0); - database tcs_catalog; -INSERT INTO tcs_catalog:informix.project_milestone -(project_milestone_id, name, description, due_date, send_notifications, completed, project_id, completion_date) -VALUES(1, 'm1', 'm1', '2018-05-31 00:00:00.000', 'f', 'f', 1245, NULL); -INSERT INTO tcs_catalog:informix.comp_catalog -(component_id, current_version, short_desc, component_name, description, function_desc, create_time, status_id, root_category_id, modify_date, public_ind) -VALUES(2054, 1, 'NA', 'TEST CODE', 'NA', NULL, '2018-05-25 22:53:29.000', 102, 9926572, '2018-05-25 22:53:29.000', 0); -INSERT INTO tcs_catalog:informix.comp_catalog -(component_id, current_version, short_desc, component_name, description, function_desc, create_time, status_id, root_category_id, modify_date, public_ind) -VALUES(2055, 1, 'NA', 'Test F2F', 'NA', NULL, '2018-05-25 22:55:21.000', 102, 9926572, '2018-05-25 22:55:21.000', 0); -INSERT INTO tcs_catalog:informix.comp_catalog -(component_id, current_version, short_desc, component_name, description, function_desc, create_time, status_id, root_category_id, modify_date, public_ind) -VALUES(2056, 1, 'NA', 'Test Web Design', 'NA', NULL, '2018-05-25 22:58:22.000', 102, 27202915, '2018-05-25 22:58:22.000', 0); -INSERT INTO tcs_catalog:informix.comp_catalog -(component_id, current_version, short_desc, component_name, description, function_desc, create_time, status_id, root_category_id, modify_date, public_ind) -VALUES(2074, 1, 'NA', 'Test Web 2', 'NA', NULL, '2018-05-25 23:55:45.000', 102, 27202915, '2018-05-25 23:55:45.000', 0); -INSERT INTO tcs_catalog:informix.comp_catalog -(component_id, current_version, short_desc, component_name, description, function_desc, create_time, status_id, root_category_id, modify_date, public_ind) -VALUES(2075, 1, 'NA', 'Test Dev Component', 'NA', NULL, '2018-05-25 23:55:45.000', 102, 5801778, '2018-05-25 23:55:45.000', 0); -INSERT INTO tcs_catalog:informix.comp_versions -(comp_vers_id, component_id, version, version_text, create_time, phase_id, phase_time, price, comments, modify_date, suspended_ind) -VALUES(2020, 2054, 1, '1.0', '2018-05-25 22:53:29.000', 112, '1976-06-05 00:00:00.000', 0.00, '132456', '2018-05-25 22:53:29.000', 0); -INSERT INTO tcs_catalog:informix.comp_versions -(comp_vers_id, component_id, version, version_text, create_time, phase_id, phase_time, price, comments, modify_date, suspended_ind) -VALUES(2021, 2055, 1, '1.0', '2018-05-25 22:55:21.000', 112, '1976-06-05 00:00:00.000', 0.00, '132456', '2018-05-25 22:55:21.000', 0); -INSERT INTO tcs_catalog:informix.comp_versions -(comp_vers_id, component_id, version, version_text, create_time, phase_id, phase_time, price, comments, modify_date, suspended_ind) -VALUES(2022, 2056, 1, '1.0', '2018-05-25 22:58:22.000', 112, '1976-06-05 00:00:00.000', 0.00, '132456', '2018-05-25 22:58:22.000', 0); -INSERT INTO tcs_catalog:informix.comp_versions -(comp_vers_id, component_id, version, version_text, create_time, phase_id, phase_time, price, comments, modify_date, suspended_ind) -VALUES(2040, 2074, 1, '1.0', '2018-05-25 23:55:45.000', 112, '1976-06-05 00:00:00.000', 0.00, '132456', '2018-05-25 23:55:45.000', 0); -INSERT INTO tcs_catalog:informix.comp_versions -(comp_vers_id, component_id, version, version_text, create_time, phase_id, phase_time, price, comments, modify_date, suspended_ind) -VALUES(2041, 2075, 1, '1.0', '2018-05-25 23:55:45.000', 112, '1976-06-05 00:00:00.000', 0.00, '132456', '2018-05-25 23:55:45.000', 0); -INSERT INTO tcs_catalog:informix.comp_version_dates -(comp_version_dates_id, comp_vers_id, phase_id, posting_date, initial_submission_date, winner_announced_date, final_submission_date, estimated_dev_date, price, total_submissions, status_id, create_time, level_id, screening_complete_date, review_complete_date, aggregation_complete_date, phase_complete_date, production_date, aggregation_complete_date_comment, phase_complete_date_comment, review_complete_date_comment, winner_announced_date_comment, initial_submission_date_comment, screening_complete_date_comment, final_submission_date_comment, production_date_comment, modify_date) -VALUES(1000, 2020, 112, '1976-06-05', '2000-02-01', '2000-02-01', '2000-02-01', '2000-02-01', 0.00, 0, 301, '2018-05-25 22:53:29', 100, '2000-02-01', '2000-02-01', '2000-02-01', '2000-02-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2018-05-25 22:53:29'); -INSERT INTO tcs_catalog:informix.comp_version_dates -(comp_version_dates_id, comp_vers_id, phase_id, posting_date, initial_submission_date, winner_announced_date, final_submission_date, estimated_dev_date, price, total_submissions, status_id, create_time, level_id, screening_complete_date, review_complete_date, aggregation_complete_date, phase_complete_date, production_date, aggregation_complete_date_comment, phase_complete_date_comment, review_complete_date_comment, winner_announced_date_comment, initial_submission_date_comment, screening_complete_date_comment, final_submission_date_comment, production_date_comment, modify_date) -VALUES(1001, 2021, 112, '1976-06-05', '2000-02-01', '2000-02-01', '2000-02-01', '2000-02-01', 0.00, 0, 301, '2018-05-25 22:55:21', 100, '2000-02-01', '2000-02-01', '2000-02-01', '2000-02-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2018-05-25 22:55:21'); -INSERT INTO tcs_catalog:informix.comp_version_dates -(comp_version_dates_id, comp_vers_id, phase_id, posting_date, initial_submission_date, winner_announced_date, final_submission_date, estimated_dev_date, price, total_submissions, status_id, create_time, level_id, screening_complete_date, review_complete_date, aggregation_complete_date, phase_complete_date, production_date, aggregation_complete_date_comment, phase_complete_date_comment, review_complete_date_comment, winner_announced_date_comment, initial_submission_date_comment, screening_complete_date_comment, final_submission_date_comment, production_date_comment, modify_date) -VALUES(1002, 2022, 112, '1976-06-05', '2000-02-01', '2000-02-01', '2000-02-01', '2000-02-01', 0.00, 0, 301, '2018-05-25 22:58:22', 100, '2000-02-01', '2000-02-01', '2000-02-01', '2000-02-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2018-05-25 22:58:22'); -INSERT INTO tcs_catalog:informix.comp_version_dates -(comp_version_dates_id, comp_vers_id, phase_id, posting_date, initial_submission_date, winner_announced_date, final_submission_date, estimated_dev_date, price, total_submissions, status_id, create_time, level_id, screening_complete_date, review_complete_date, aggregation_complete_date, phase_complete_date, production_date, aggregation_complete_date_comment, phase_complete_date_comment, review_complete_date_comment, winner_announced_date_comment, initial_submission_date_comment, screening_complete_date_comment, final_submission_date_comment, production_date_comment, modify_date) -VALUES(1020, 2040, 112, '1976-06-05', '2000-02-01', '2000-02-01', '2000-02-01', '2000-02-01', 0.00, 0, 301, '2018-05-25 23:55:45', 100, '2000-02-01', '2000-02-01', '2000-02-01', '2000-02-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2018-05-25 23:55:46'); -INSERT INTO tcs_catalog:informix.comp_version_dates -(comp_version_dates_id, comp_vers_id, phase_id, posting_date, initial_submission_date, winner_announced_date, final_submission_date, estimated_dev_date, price, total_submissions, status_id, create_time, level_id, screening_complete_date, review_complete_date, aggregation_complete_date, phase_complete_date, production_date, aggregation_complete_date_comment, phase_complete_date_comment, review_complete_date_comment, winner_announced_date_comment, initial_submission_date_comment, screening_complete_date_comment, final_submission_date_comment, production_date_comment, modify_date) -VALUES(1021, 2041, 112, '1976-06-05', '2000-02-01', '2000-02-01', '2000-02-01', '2000-02-01', 0.00, 0, 301, '2018-05-25 23:55:45', 100, '2000-02-01', '2000-02-01', '2000-02-01', '2000-02-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2018-05-25 23:55:46'); -INSERT INTO tcs_catalog:informix.comp_documentation -(document_id, comp_vers_id, document_type_id, document_name, url) -VALUES(2021, 2020, 24, 'exception', '2054/2020/projectexception.txt'); -INSERT INTO tcs_catalog:informix.comp_technology -(comp_tech_id, comp_vers_id, technology_type_id) -VALUES(2200, 2020, 27167847); -INSERT INTO tcs_catalog:informix.comp_technology -(comp_tech_id, comp_vers_id, technology_type_id) -VALUES(2201, 2020, 26951709); -INSERT INTO tcs_catalog:informix.comp_technology -(comp_tech_id, comp_vers_id, technology_type_id) -VALUES(2202, 2021, 27050144); -INSERT INTO tcs_catalog:informix.comp_technology -(comp_tech_id, comp_vers_id, technology_type_id) -VALUES(2203, 2021, 13); -INSERT INTO tcs_catalog:informix.comp_categories -(comp_categories_id, component_id, category_id) -VALUES(2020, 2054, 9926575); -INSERT INTO tcs_catalog:informix.comp_categories -(comp_categories_id, component_id, category_id) -VALUES(2021, 2055, 9926575); -INSERT INTO tcs_catalog:informix.comp_categories -(comp_categories_id, component_id, category_id) -VALUES(2022, 2056, 27202916); -INSERT INTO tcs_catalog:informix.comp_categories -(comp_categories_id, component_id, category_id) -VALUES(2040, 2074, 27202916); -INSERT INTO tcs_catalog:informix.component_inquiry -(component_inquiry_id, component_id, user_id, comment, agreed_to_terms, rating, phase, tc_user_id, version, create_time, project_id) -VALUES(27210568, 2055, 132458, NULL, 1, 0, 149, 132458, 1, '2018-05-25 22:55:21.000', 30005521); -INSERT INTO tcs_catalog:informix.component_inquiry -(component_inquiry_id, component_id, user_id, comment, agreed_to_terms, rating, phase, tc_user_id, version, create_time, project_id) -VALUES(27210569, 2055, 124916, NULL, 1, 0, 149, 124916, 1, '2018-05-25 22:55:21.000', 30005521); -INSERT INTO tcs_catalog:informix.component_inquiry -(component_inquiry_id, component_id, user_id, comment, agreed_to_terms, rating, phase, tc_user_id, version, create_time, project_id) -VALUES(27210570, 2055, 124776, NULL, 1, 0, 149, 124776, 1, '2018-05-25 22:55:21.000', 30005521); - -INSERT INTO tcs_catalog:informix.project_studio_specification -(project_studio_spec_id, goals, target_audience, branding_guidelines, disliked_design_websites, other_instructions, winning_criteria, submitters_locked_between_rounds, round_one_introduction, round_two_introduction, colors, fonts, layout_and_size, contest_introduction, contest_description, content_requirements, general_feedback, create_user, create_date, modify_user, modify_date) -VALUES(1, '', '', '', '', '', '', 'f', 'round 1 info', 'roundd 2 info', '', '', '', 'intro', NULL, NULL, NULL, '132456', '2018-05-25 22:58:22.083', '132456', '2018-05-25 23:50:05.324'); -INSERT INTO tcs_catalog:informix.project_studio_specification -(project_studio_spec_id, goals, target_audience, branding_guidelines, disliked_design_websites, other_instructions, winning_criteria, submitters_locked_between_rounds, round_one_introduction, round_two_introduction, colors, fonts, layout_and_size, contest_introduction, contest_description, content_requirements, general_feedback, create_user, create_date, modify_user, modify_date) -VALUES(21, '', '', '', '', '', '', 'f', 'round 1', 'routnd 2', '', '', '', 'intro', NULL, NULL, NULL, '132456', '2018-05-25 23:55:44.406', '132456', '2018-05-26 00:06:07.351'); +alter table upload add url lvarchar(1000); INSERT INTO tcs_catalog:informix.project (project_id, project_status_id, project_category_id, project_studio_spec_id, project_mm_spec_id, project_sub_category_id, create_user, create_date, modify_user, modify_date, tc_direct_project_id) -VALUES(30005520, 1, 39, NULL, NULL, NULL, '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 23:36:58.386', 1245); -INSERT INTO tcs_catalog:informix.project -(project_id, project_status_id, project_category_id, project_studio_spec_id, project_mm_spec_id, project_sub_category_id, create_user, create_date, modify_user, modify_date, tc_direct_project_id) -VALUES(30005521, 1, 38, NULL, NULL, NULL, '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:21.782', 1245); -INSERT INTO tcs_catalog:informix.project -(project_id, project_status_id, project_category_id, project_studio_spec_id, project_mm_spec_id, project_sub_category_id, create_user, create_date, modify_user, modify_date, tc_direct_project_id) -VALUES(30005522, 9, 17, 1, NULL, NULL, '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 23:50:05.268', 1245); -INSERT INTO tcs_catalog:informix.project -(project_id, project_status_id, project_category_id, project_studio_spec_id, project_mm_spec_id, project_sub_category_id, create_user, create_date, modify_user, modify_date, tc_direct_project_id) -VALUES(30005530, 1, 17, 21, NULL, NULL, '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-26 00:06:07.266', 1245); -INSERT INTO tcs_catalog:informix.project -(project_id, project_status_id, project_category_id, project_studio_spec_id, project_mm_spec_id, project_sub_category_id, create_user, create_date, modify_user, modify_date, tc_direct_project_id) -VALUES(30005540, 1, 2, NULL, NULL, NULL, '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-26 00:06:07.266', 1245); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95235, 30005520, 1, 2, '2018-05-25 09:00:00.000', '2018-05-25 23:10:00.346', '2018-06-10 23:10:00.000', '2018-05-25 23:10:00.346', NULL, 172800000, '132456', '2018-05-25 22:53:29.130', '132456', '2018-05-25 23:36:58.506'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95236, 30005520, 2, 1, NULL, '2018-05-25 23:15:00.000', '2018-06-10 23:10:00.000', NULL, NULL, 431700000, '132456', '2018-05-25 22:53:29.130', '132456', '2018-05-25 23:36:58.506'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95237, 30005520, 4, 1, NULL, '2018-06-10 23:10:00.000', '2018-06-21 23:10:00.000', NULL, NULL, 172800000, '132456', '2018-05-25 22:53:29.130', '132456', '2018-05-25 23:36:58.506'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95238, 30005520, 5, 1, NULL, '2018-06-21 23:10:00.000', '2018-06-25 23:10:00.000', NULL, NULL, 86400000, '132456', '2018-05-25 22:53:29.130', '132456', '2018-05-25 23:36:58.506'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95239, 30005520, 6, 1, NULL, '2018-06-25 23:10:00.000', '2018-06-30 11:10:00.000', NULL, NULL, 43200000, '132456', '2018-05-25 22:53:29.130', '132456', '2018-05-25 23:36:58.506'); +VALUES(30005521, 1, 38, NULL, NULL, NULL, '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:21.782', null); + INSERT INTO tcs_catalog:informix.project_phase (project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) VALUES(95243, 30005521, 1, 3, '2018-05-26 09:00:00.000', '2018-05-26 09:00:00.000', '2018-06-05 09:00:00.000', NULL, NULL, 864000000, '132456', '2018-05-25 22:55:21.580', '132456', '2018-05-25 22:55:45.206'); @@ -192,36 +15,38 @@ VALUES(95244, 30005521, 18, 3, NULL, '2018-05-25 22:55:45.167', '2018-05-30 17:0 INSERT INTO tcs_catalog:informix.project_phase (project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) VALUES(95245, 30005521, 2, 3, NULL, '2018-05-26 09:05:00.000', '2018-06-05 09:00:00.000', '2018-05-25 22:55:45.168', '2018-05-25 22:55:45.168', 863700000, '132456', '2018-05-25 22:55:21.580', '132456', '2018-05-25 22:55:45.206'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95256, 30005522, 13, 1, '2018-05-25 22:58:00.000', '2018-05-25 22:58:00.000', '2018-05-27 22:58:00.000', NULL, NULL, 172800000, '132456', '2018-05-25 22:58:22.110', '132456', '2018-05-25 23:50:05.398'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95257, 30005522, 14, 1, NULL, '2018-05-27 22:58:00.000', '2018-05-28 04:58:00.000', NULL, NULL, 21600000, '132456', '2018-05-25 22:58:22.110', '132456', '2018-05-25 23:50:05.398'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95258, 30005522, 1, 1, '2018-05-26 09:00:00.000', '2018-05-28 04:58:00.000', '2018-05-31 04:58:00.000', NULL, NULL, 259200000, '132456', '2018-05-25 22:58:22.110', '132456', '2018-05-25 23:50:05.398'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95259, 30005522, 15, 1, NULL, '2018-05-28 05:03:00.000', '2018-05-31 04:58:00.000', NULL, NULL, 258900000, '132456', '2018-05-25 22:58:22.110', '132456', '2018-05-25 23:50:05.398'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95260, 30005522, 2, 1, NULL, '2018-05-28 05:03:00.000', '2018-06-03 04:58:00.000', NULL, NULL, 518100000, '132456', '2018-05-25 22:58:22.110', '132456', '2018-05-25 23:50:05.398'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95261, 30005522, 16, 1, NULL, '2018-05-31 04:58:00.000', '2018-05-31 08:58:00.000', NULL, NULL, 14400000, '132456', '2018-05-25 22:58:22.110', '132456', '2018-05-25 23:50:05.398'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95262, 30005522, 17, 1, NULL, '2018-05-31 08:58:00.000', '2018-06-02 08:58:00.000', NULL, NULL, 172800000, '132456', '2018-05-25 22:58:22.110', '132456', '2018-05-25 23:50:05.398'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95263, 30005522, 3, 1, NULL, '2018-06-03 04:58:00.000', '2018-06-03 08:58:00.000', NULL, NULL, 14400000, '132456', '2018-05-25 22:58:22.110', '132456', '2018-05-25 23:50:05.398'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95264, 30005522, 4, 1, NULL, '2018-06-03 08:58:00.000', '2018-06-09 08:58:00.000', NULL, NULL, 518400000, '132456', '2018-05-25 22:58:22.110', '132456', '2018-05-25 23:50:05.398'); -INSERT INTO tcs_catalog:informix.project_phase -(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) -VALUES(95265, 30005522, 11, 1, NULL, '2018-06-09 08:58:00.000', '2018-06-14 08:58:00.000', NULL, NULL, 432000000, '132456', '2018-05-25 22:58:22.110', '132456', '2018-05-25 23:50:05.398'); + +INSERT INTO tcs_catalog:informix.project_info +(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) +VALUES(30005521, 28, 'true', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); + +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125202, 13, 30005521, NULL, 132456, '132456', '2018-05-25 22:55:21.597', '132456', '2018-05-25 22:55:21.597'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125203, 13, 30005521, NULL, 22770213, '132456', '2018-05-25 22:55:21.614', '132456', '2018-05-25 22:55:21.614'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125204, 1, 30005521, NULL, 132458, '132458', '2018-05-25 22:55:22.218', '132458', '2018-05-25 22:55:22.218'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125205, 1, 30005521, NULL, 124916, '124916', '2018-05-25 22:55:22.320', '124916', '2018-05-25 22:55:22.320'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125206, 1, 30005521, NULL, 124776, '124776', '2018-05-25 22:55:22.395', '124776', '2018-05-25 22:55:45.140'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125207, 21, 30005521, 95244, 132456, '132456', '2018-05-25 22:55:45.260', '132456', '2018-05-25 22:55:45.260'); + + +INSERT INTO tcs_catalog:informix.project_studio_specification +(project_studio_spec_id, goals, target_audience, branding_guidelines, disliked_design_websites, other_instructions, winning_criteria, submitters_locked_between_rounds, round_one_introduction, round_two_introduction, colors, fonts, layout_and_size, contest_introduction, contest_description, content_requirements, general_feedback, create_user, create_date, modify_user, modify_date) +VALUES(21, '', '', '', '', '', '', 'f', 'round 1', 'routnd 2', '', '', '', 'intro', NULL, NULL, NULL, '132456', '2018-05-25 23:55:44.406', '132456', '2018-05-26 00:06:07.351'); +INSERT INTO tcs_catalog:informix.project +(project_id, project_status_id, project_category_id, project_studio_spec_id, project_mm_spec_id, project_sub_category_id, create_user, create_date, modify_user, modify_date, tc_direct_project_id) +VALUES(30005530, 1, 17, 21, NULL, NULL, '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-26 00:06:07.266', null); + INSERT INTO tcs_catalog:informix.project_phase (project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) VALUES(95280, 30005530, 13, 3, '2018-05-25 23:55:00.000', '2018-05-25 23:55:00.000', '2018-05-27 23:55:00.000', NULL, NULL, 172800000, '132456', '2018-05-25 23:55:44.479', '132456', '2018-05-26 00:06:07.420'); @@ -252,6 +77,31 @@ VALUES(95288, 30005530, 4, 3, NULL, '2018-06-03 09:55:00.000', '2018-06-09 09:55 INSERT INTO tcs_catalog:informix.project_phase (project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) VALUES(95289, 30005530, 11, 2, NULL, '2018-06-09 09:55:00.000', '2018-06-14 09:55:00.000', NULL, NULL, 432000000, '132456', '2018-05-25 23:55:44.479', '132456', '2018-05-26 00:06:07.420'); + +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125220, 13, 30005530, NULL, 132456, '132456', '2018-05-25 23:55:44.609', '132456', '2018-05-25 23:55:44.609'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125221, 13, 30005530, NULL, 22770213, '132456', '2018-05-25 23:55:44.647', '132456', '2018-05-25 23:55:44.647'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125222, 17, 30005530, NULL, 132456, '132456', '2018-05-25 23:55:45.557', '132456', '2018-05-25 23:55:45.850'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125223, 18, 30005530, 95281, 132458, '132456', '2018-05-26 02:47:33.000', '132456', '2018-05-26 02:47:33.000'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125224, 1, 30005530, 95284, 124764, '132456', '2018-05-26 03:06:13.000', '132456', '2018-05-26 03:06:13.000'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125225, 1, 30005530, 95284, 124772, '132456', '2018-05-26 03:07:02.000', '132456', '2018-05-26 03:07:02.000'); + + +INSERT INTO tcs_catalog:informix.project +(project_id, project_status_id, project_category_id, project_studio_spec_id, project_mm_spec_id, project_sub_category_id, create_user, create_date, modify_user, modify_date, tc_direct_project_id) +VALUES(30005540, 1, 2, NULL, NULL, NULL, '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-26 00:06:07.266', null); + INSERT INTO tcs_catalog:informix.project_phase (project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) VALUES(95300, 30005540, 1, 2, NULL, '2018-06-09 09:55:00.000', '2018-06-14 09:55:00.000', NULL, NULL, 432000000, '132456', '2018-05-25 23:55:44.479', '132456', '2018-05-26 00:06:07.420'); @@ -282,1285 +132,78 @@ VALUES(95308, 30005540, 9, 2, NULL, '2018-06-09 09:55:00.000', '2018-06-14 09:55 INSERT INTO tcs_catalog:informix.project_phase (project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) VALUES(95309, 30005540, 10, 2, NULL, '2018-06-09 09:55:00.000', '2018-06-14 09:55:00.000', NULL, NULL, 432000000, '132456', '2018-05-25 23:55:44.479', '132456', '2018-05-26 00:06:07.420'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95235, 2, '0', '132456', '2018-05-25 22:53:29.144', '132456', '2018-05-25 22:53:29.144'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95237, 1, '30000418', '132456', '2018-05-25 22:53:29.158', '132456', '2018-05-25 23:09:47.278'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95237, 6, '2', '132456', '2018-05-25 22:53:29.158', '132456', '2018-05-25 22:53:29.158'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95238, 4, 'No', '132456', '2018-05-25 22:53:29.161', '132456', '2018-05-25 22:53:29.161'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95243, 2, '0', '132456', '2018-05-25 22:55:21.583', '132456', '2018-05-25 22:55:21.583'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95244, 1, '30000419', '132456', '2018-05-25 22:55:21.586', '132456', '2018-05-25 22:55:21.586'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95244, 6, '1', '132456', '2018-05-25 22:55:21.586', '132456', '2018-05-25 22:55:21.586'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95257, 1, '30000722', '132456', '2018-05-25 22:58:22.115', '132456', '2018-05-25 22:58:22.115'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95257, 6, '1', '132456', '2018-05-25 22:58:22.115', '132456', '2018-05-25 22:58:22.115'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95258, 2, '0', '132456', '2018-05-25 22:58:22.119', '132456', '2018-05-25 22:58:22.119'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95261, 1, '30000416', '132456', '2018-05-25 22:58:22.137', '132456', '2018-05-25 22:58:22.137'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95262, 1, '30000417', '132456', '2018-05-25 22:58:22.140', '132456', '2018-05-25 22:58:22.140'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95263, 1, '30000414', '132456', '2018-05-25 22:58:22.142', '132456', '2018-05-25 22:58:22.142'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95264, 1, '30000418', '132456', '2018-05-25 22:58:22.145', '132456', '2018-05-25 22:58:22.145'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95264, 6, '1', '132456', '2018-05-25 22:58:22.145', '132456', '2018-05-25 22:58:22.145'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95265, 1, '30000720', '132456', '2018-05-25 22:58:22.148', '132456', '2018-05-25 23:50:05.486'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95265, 6, '1', '132456', '2018-05-25 22:58:22.148', '132456', '2018-05-25 22:58:22.148'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95281, 1, '30000722', '132456', '2018-05-25 23:55:44.500', '132456', '2018-05-25 23:55:44.500'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95281, 6, '1', '132456', '2018-05-25 23:55:44.500', '132456', '2018-05-25 23:55:44.500'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95282, 2, '0', '132456', '2018-05-25 23:55:44.505', '132456', '2018-05-25 23:55:44.505'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95285, 1, '30000416', '132456', '2018-05-25 23:55:44.512', '132456', '2018-05-25 23:55:44.512'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95286, 1, '30000417', '132456', '2018-05-25 23:55:44.514', '132456', '2018-05-25 23:55:44.514'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95287, 1, '30000414', '132456', '2018-05-25 23:55:44.516', '132456', '2018-05-25 23:55:44.516'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95288, 1, '30000418', '132456', '2018-05-25 23:55:44.518', '132456', '2018-05-25 23:55:44.518'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95288, 6, '1', '132456', '2018-05-25 23:55:44.518', '132456', '2018-05-25 23:55:44.518'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95289, 1, '30000720', '132456', '2018-05-25 23:55:44.521', '132456', '2018-05-26 00:06:07.495'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95289, 6, '1', '132456', '2018-05-25 23:55:44.521', '132456', '2018-05-25 23:55:44.521'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95300, 2, '0', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95300, 5, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95301, 3, '0', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95301, 5, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95302, 5, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95302, 1, '30000410', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95303, 5, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95303, 1, '30000411', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95303, 6, '3', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95304, 5, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95304, 4, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95305, 5, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95306, 5, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95307, 5, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95308, 5, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_criteria -(project_phase_id, phase_criteria_type_id, parameter, create_user, create_date, modify_user, modify_date) -VALUES(95309, 5, 'No', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95235, 95236, 1, 1, 300000, '132456', '2018-05-25 22:53:29.165', '132456', '2018-05-25 22:53:29.165'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95236, 95237, 0, 1, 0, '132456', '2018-05-25 22:53:29.165', '132456', '2018-05-25 22:53:29.165'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95237, 95238, 0, 1, 0, '132456', '2018-05-25 22:53:29.165', '132456', '2018-05-25 22:53:29.165'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95238, 95239, 0, 1, 0, '132456', '2018-05-25 22:53:29.165', '132456', '2018-05-25 22:53:29.165'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95245, 95244, 1, 1, 0, '132456', '2018-05-25 22:55:21.590', '132456', '2018-05-25 22:55:21.590'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95243, 95245, 1, 1, 300000, '132456', '2018-05-25 22:55:21.590', '132456', '2018-05-25 22:55:21.590'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95256, 95257, 0, 1, 0, '132456', '2018-05-25 22:58:22.151', '132456', '2018-05-25 22:58:22.151'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95257, 95258, 0, 1, 0, '132456', '2018-05-25 22:58:22.151', '132456', '2018-05-25 22:58:22.151'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95258, 95259, 1, 1, 300000, '132456', '2018-05-25 22:58:22.151', '132456', '2018-05-25 22:58:22.151'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95258, 95260, 1, 1, 300000, '132456', '2018-05-25 22:58:22.151', '132456', '2018-05-25 22:58:22.151'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95259, 95261, 0, 1, 0, '132456', '2018-05-25 22:58:22.151', '132456', '2018-05-25 22:58:22.151'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95261, 95262, 0, 1, 0, '132456', '2018-05-25 22:58:22.151', '132456', '2018-05-25 22:58:22.151'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95260, 95263, 0, 1, 0, '132456', '2018-05-25 22:58:22.151', '132456', '2018-05-25 22:58:22.151'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95263, 95264, 0, 1, 0, '132456', '2018-05-25 22:58:22.151', '132456', '2018-05-25 22:58:22.151'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95264, 95265, 0, 1, 0, '132456', '2018-05-25 22:58:22.151', '132456', '2018-05-25 22:58:22.151'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95280, 95281, 0, 1, 0, '132456', '2018-05-25 23:55:44.527', '132456', '2018-05-25 23:55:44.527'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95281, 95282, 0, 1, 0, '132456', '2018-05-25 23:55:44.527', '132456', '2018-05-25 23:55:44.527'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95282, 95283, 1, 1, 300000, '132456', '2018-05-25 23:55:44.527', '132456', '2018-05-25 23:55:44.527'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95282, 95284, 1, 1, 300000, '132456', '2018-05-25 23:55:44.527', '132456', '2018-05-25 23:55:44.527'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95283, 95285, 0, 1, 0, '132456', '2018-05-25 23:55:44.527', '132456', '2018-05-25 23:55:44.527'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95285, 95286, 0, 1, 0, '132456', '2018-05-25 23:55:44.527', '132456', '2018-05-25 23:55:44.527'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95284, 95287, 0, 1, 0, '132456', '2018-05-25 23:55:44.527', '132456', '2018-05-25 23:55:44.527'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95287, 95288, 0, 1, 0, '132456', '2018-05-25 23:55:44.527', '132456', '2018-05-25 23:55:44.527'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95288, 95289, 0, 1, 0, '132456', '2018-05-25 23:55:44.527', '132456', '2018-05-25 23:55:44.527'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95300, 95301, 1, 1, 0, '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95301, 95302, 0, 1, 0, '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95302, 95303, 0, 1, 0, '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95303, 95304, 0, 1, 0, '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95304, 95305, 0, 1, 0, '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95305, 95306, 0, 1, 0, '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95307, 95308, 0, 1, 0, '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.phase_dependency -(dependency_phase_id, dependent_phase_id, dependency_start, dependent_start, lag_time, create_user, create_date, modify_user, modify_date) -VALUES(95308, 95309, 0, 1, 0, '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 1, '2020', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 2, '2054', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 3, '1', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 5, '9926572', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 6, 'TEST CODE', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 7, '1.0', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 9, 'On', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 10, 'On', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 78, 'Development', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 11, 'On', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 79, 'COMMUNITY', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 12, 'Yes', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 13, 'No', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 14, 'Open', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 16, '350', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 26, 'Off', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 31, '0', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 17, '', '132456', '2018-05-25 23:38:03.000', '132456', '2018-05-25 23:38:03.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 34, 'public', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 35, '0', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 32, '1', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 33, '231', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 38, '0', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 39, '0', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 36, '350', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 37, '150', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 43, 'true', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 40, 'M', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 41, 'false', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 46, 'true', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 44, 'true', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 45, 'false', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 49, '0', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 48, 'true', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 59, 'false', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 58, '132456', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 57, '0', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 62, '05.25.2018 10:53 PM', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 61, '731.0', '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 1, '2021', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 2, '2055', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 3, '1', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 5, '9926572', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info + +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125227, 13, 30005540, NULL, 22770213, '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 23:37:01.688'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125228, 1, 30005540, NULL, 132458, '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 23:37:01.688'); + +UPDATE id_sequences SET next_block_start = 93000 WHERE name = 'upload_id_seq'; +UPDATE id_sequences SET next_block_start = 60000 WHERE name = 'submission_id_seq'; + + +database informixoltp; +INSERT INTO contest(contest_id, name) VALUES(2001, 'test contest 2001'); +INSERT INTO round(round_id, contest_id, name, round_type_id) VALUES(2001, 2001, 'test round 2001', 13); +INSERT INTO round_segment(round_id, segment_id, start_time, end_time, status) VALUES(2001, 1, '2018-12-1 12:00:00', '2018-12-6 12:00:00', 'A'); +INSERT INTO round_segment(round_id, segment_id, start_time, end_time, status) VALUES(2001, 5, '2018-12-15 12:00:00', '2018-12-25 12:00:00', 'A'); + +INSERT INTO problem(problem_id, name) VALUES(2001, 'test problem'); +INSERT INTO component(component_id, problem_id, result_type_id, method_name, class_name) VALUES(2001, 2001, 1, 'test method', 'test class'); +INSERT INTO division(division_id, division_desc) VALUES(100, 'test division'); +INSERT INTO round_component(round_id, component_id, division_id) VALUES(2001, 2001, 100); + +database tcs_catalog; +INSERT INTO project(project_id, project_status_id, project_category_id, create_user, create_date, modify_user, modify_date, tc_direct_project_id) +VALUES(30054163, 1, 37, 132456, current, 132456, current, null); + +INSERT INTO tcs_catalog:informix.project_phase +(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) +VALUES(95310, 30054163, 1, 3, '2018-05-26 09:00:00.000', '2018-05-26 09:00:00.000', '2018-06-05 09:00:00.000', NULL, NULL, 864000000, '132456', '2018-05-25 22:55:21.580', '132456', '2018-05-25 22:55:45.206'); +INSERT INTO tcs_catalog:informix.project_phase +(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) +VALUES(95311, 30054163, 2, 3, NULL, '2018-05-26 09:05:00.000', '2018-06-05 09:00:00.000', '2018-05-25 22:55:45.168', '2018-05-25 22:55:45.168', 863700000, '132456', '2018-05-25 22:55:21.580', '132456', '2018-05-25 22:55:45.206'); +INSERT INTO tcs_catalog:informix.project_phase +(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) +VALUES(95312, 30054163, 4, 3, NULL, '2018-05-27 09:05:00.000', '2018-06-05 09:00:00.000', '2018-05-25 22:55:45.168', '2018-05-25 22:55:45.168', 863700000, '132456', '2018-05-25 22:55:21.580', '132456', '2018-05-25 22:55:45.206'); + +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125231, 1, 30054163, NULL, 132458, '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 23:37:01.688'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125232, 1, 30054163, NULL, 124916, '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 23:37:01.688'); + +INSERT INTO informix.project_info (project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 6, 'Test F2F', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info +VALUES(30054163, 56, 2001, '132456', current, '132456', current); +INSERT INTO informix.project_info (project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 7, '1.0', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info +VALUES(30054163, 28, 'true', '132456', current, '132456', current); + + +INSERT INTO project(project_id, project_status_id, project_category_id, create_user, create_date, modify_user, modify_date, tc_direct_project_id) +VALUES(30054164, 1, 37, 132456, current, 132456, current, null); + +INSERT INTO tcs_catalog:informix.project_phase +(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) +VALUES(95320, 30054164, 1, 3, '2018-05-26 09:00:00.000', '2018-05-26 09:00:00.000', '2018-06-05 09:00:00.000', NULL, NULL, 864000000, '132456', '2018-05-25 22:55:21.580', '132456', '2018-05-25 22:55:45.206'); +INSERT INTO tcs_catalog:informix.project_phase +(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) +VALUES(95321, 30054164, 2, 3, NULL, '2018-05-26 09:05:00.000', '2018-06-05 09:00:00.000', '2018-05-25 22:55:45.168', '2018-05-25 22:55:45.168', 863700000, '132456', '2018-05-25 22:55:21.580', '132456', '2018-05-25 22:55:45.206'); +INSERT INTO tcs_catalog:informix.project_phase +(project_phase_id, project_id, phase_type_id, phase_status_id, fixed_start_time, scheduled_start_time, scheduled_end_time, actual_start_time, actual_end_time, duration, create_user, create_date, modify_user, modify_date) +VALUES(95322, 30054164, 4, 3, NULL, '2018-05-27 09:05:00.000', '2018-06-05 09:00:00.000', '2018-05-25 22:55:45.168', '2018-05-25 22:55:45.168', 863700000, '132456', '2018-05-25 22:55:21.580', '132456', '2018-05-25 22:55:45.206'); + +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125241, 1, 30054164, NULL, 132458, '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 23:37:01.688'); +INSERT INTO tcs_catalog:informix.resource +(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) +VALUES(125242, 1, 30054164, NULL, 124916, '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 23:37:01.688'); + +INSERT INTO informix.project_info (project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 9, 'On', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 10, 'On', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 78, 'Development', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 11, 'On', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 79, 'COMMUNITY', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 12, 'Yes', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 13, 'No', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 14, 'Open', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 16, '800', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 82, '1', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 26, 'Off', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 28, 'true', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 31, '0', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 30, '0', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 34, 'public', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 35, '0', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 32, '1', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 33, '112', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 38, '0', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 39, '0', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 36, '800', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 37, '0', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 43, 'true', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 40, 'M', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 41, 'false', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 46, 'true', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 44, 'false', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 45, 'false', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 49, '0', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 48, 'true', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 59, 'false', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 58, '132456', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 57, '0', '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 62, '05.25.2018 10:55 PM', '132456', '2018-05-25 22:55:21.000', '132456', '2018-05-25 22:55:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 61, '912.0', '132456', '2018-05-25 22:55:21.000', '132456', '2018-05-25 22:55:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 1, '2022', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 2, '2056', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 3, '1', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 5, '27202915', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 6, 'Test Web Design', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 7, '1.0', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 9, 'On', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:22.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 10, 'On', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 78, 'Design', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 11, 'On', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 79, 'INTERNAL', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 12, 'Yes', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 13, 'No', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 14, 'Open', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 16, '1250', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 26, 'Off', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 31, '0', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 1, '2040', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 34, 'public', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 35, '75', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 32, '1', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 33, '100', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 36, '1250', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 37, '250', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 43, 'true', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 41, 'false', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 46, 'true', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 44, 'false', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 45, 'true', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 51, '5', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 49, '0', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 48, 'false', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 53, 'true', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 52, 'true', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 59, 'false', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 58, '132456', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 57, '0', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 62, '05.25.2018 10:58 PM', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 61, '1775.0', '132456', '2018-05-25 22:58:21.000', '132456', '2018-05-25 22:58:21.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 17, '', '132456', '2018-05-25 23:09:46.000', '132456', '2018-05-25 23:09:46.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 4, '0', '132456', '2018-05-25 23:09:46.000', '132456', '2018-05-25 23:09:46.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 22, '05.30.2018 23:10 UTC', '132456', '2018-05-25 23:09:46.000', '132456', '2018-05-25 23:36:57.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 4, '33', '132456', '2018-05-25 23:38:03.000', '132456', '2018-05-25 23:38:03.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 22, '06.03.2018 04:58 UTC', '132456', '2018-05-25 23:38:03.000', '132456', '2018-05-25 23:38:03.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 2, '2074', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 3, '1', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 5, '27202915', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 6, 'Test Web 2', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 7, '1.0', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 9, 'On', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:45.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 10, 'On', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 78, 'Design', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 11, 'On', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 79, 'INTERNAL', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 12, 'Yes', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 13, 'No', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 14, 'Open', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 16, '1250', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 26, 'Off', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 31, '0', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 34, 'public', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 35, '75', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 32, '1', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 33, '100', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 36, '1250', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 37, '250', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 43, 'true', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 41, 'false', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 46, 'true', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 44, 'false', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 45, 'true', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 51, '5', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 49, '0', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 48, 'false', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 53, 'true', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 52, 'true', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 59, 'false', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 58, '132456', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 57, '0', '132456', '2018-05-25 23:55:44.000', '132456', '2018-05-25 23:55:44.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 62, '05.25.2018 11:55 PM', '132456', '2018-05-25 23:55:45.000', '132456', '2018-05-25 23:55:45.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 61, '1675.0', '132456', '2018-05-25 23:55:45.000', '132456', '2018-05-25 23:55:45.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 17, '', '132456', '2018-05-26 00:06:06.000', '132456', '2018-05-26 00:06:06.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 4, '0', '132456', '2018-05-26 00:06:06.000', '132456', '2018-05-26 00:06:06.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 22, '06.03.2018 05:55 UTC', '132456', '2018-05-26 00:06:06.000', '132456', '2018-05-26 00:06:06.000'); - -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 1, '2041', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 2, '2075', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 3, '1', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 4, '0', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 5, '5801778', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 6, 'Test Dev Component', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 7, '1.0', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 9, 'Off', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 10, 'On', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 11, 'On', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 12, 'Yes', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 13, 'Yes', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 14, 'Open', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 16, '0.0', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 26, 'On', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 29, 'On', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 41, 'true', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30005540, 43, 'true', '132458', '2010-05-21 07:26:30.000', '132458', '2010-05-21 07:26:30.000'); -INSERT INTO tcs_catalog:informix.project_platform -(project_id, project_platform_id, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 14, '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_platform -(project_id, project_platform_id, create_user, create_date, modify_user, modify_date) -VALUES(30005520, 17, '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_platform -(project_id, project_platform_id, create_user, create_date, modify_user, modify_date) -VALUES(30005521, 10, '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_result -(user_id, project_id, old_rating, new_rating, raw_score, final_score, payment, placed, rating_ind, valid_submission_ind, create_date, modify_date, passed_review_ind, point_adjustment, rating_order) -VALUES(132458, 30005521, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, '2018-05-25 22:55:21.000', '2018-05-25 22:55:21.000', NULL, NULL, NULL); -INSERT INTO tcs_catalog:informix.project_result -(user_id, project_id, old_rating, new_rating, raw_score, final_score, payment, placed, rating_ind, valid_submission_ind, create_date, modify_date, passed_review_ind, point_adjustment, rating_order) -VALUES(124916, 30005521, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, '2018-05-25 22:55:21.000', '2018-05-25 22:55:21.000', NULL, NULL, NULL); -INSERT INTO tcs_catalog:informix.project_result -(user_id, project_id, old_rating, new_rating, raw_score, final_score, payment, placed, rating_ind, valid_submission_ind, create_date, modify_date, passed_review_ind, point_adjustment, rating_order) -VALUES(124776, 30005521, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, '2018-05-25 22:55:21.000', '2018-05-25 22:55:21.000', NULL, NULL, NULL); -INSERT INTO tcs_catalog:informix.project_spec -(project_spec_id, project_id, version, detailed_requirements, submission_deliverables, environment_setup_instruction, final_submission_guidelines, private_description, create_user, create_date, modify_user, modify_date) -VALUES(1000, 30005520, 1, NULL, '', '', NULL, NULL, '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_spec -(project_spec_id, project_id, version, detailed_requirements, submission_deliverables, environment_setup_instruction, final_submission_guidelines, private_description, create_user, create_date, modify_user, modify_date) -VALUES(1001, 30005520, 2, NULL, '', '', NULL, NULL, '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_spec -(project_spec_id, project_id, version, detailed_requirements, submission_deliverables, environment_setup_instruction, final_submission_guidelines, private_description, create_user, create_date, modify_user, modify_date) -VALUES(1002, 30005520, 3, NULL, '', '', NULL, NULL, '132456', '2018-05-25 22:53:28.000', '132456', '2018-05-25 22:53:28.000'); -INSERT INTO tcs_catalog:informix.project_spec -(project_spec_id, project_id, version, detailed_requirements, submission_deliverables, environment_setup_instruction, final_submission_guidelines, private_description, create_user, create_date, modify_user, modify_date) -VALUES(1003, 30005521, 1, NULL, '', '', NULL, NULL, '132456', '2018-05-25 22:55:20.000', '132456', '2018-05-25 22:55:20.000'); -INSERT INTO tcs_catalog:informix.project_spec -(project_spec_id, project_id, version, detailed_requirements, submission_deliverables, environment_setup_instruction, final_submission_guidelines, private_description, create_user, create_date, modify_user, modify_date) -VALUES(1004, 30005521, 2, NULL, '', '', NULL, NULL, '132456', '2018-05-25 22:55:21.000', '132456', '2018-05-25 22:55:21.000'); -INSERT INTO tcs_catalog:informix.project_spec -(project_spec_id, project_id, version, detailed_requirements, submission_deliverables, environment_setup_instruction, final_submission_guidelines, private_description, create_user, create_date, modify_user, modify_date) -VALUES(1005, 30005521, 3, NULL, '', '', NULL, NULL, '132456', '2018-05-25 22:55:21.000', '132456', '2018-05-25 22:55:21.000'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(1, 30005520, 1, 350, 15, 1, '132456', '2018-05-25 22:53:29.095', '132456', '2018-05-25 23:36:58.418'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(2, 30005520, 2, 150, 15, 1, '132456', '2018-05-25 22:53:29.104', '132456', '2018-05-25 23:36:58.428'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(3, 30005521, 1, 800, 15, 1, '132456', '2018-05-25 22:55:21.569', '132456', '2018-05-25 22:55:21.804'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(4, 30005522, 1, 1250, 15, 1, '132456', '2018-05-25 22:58:22.071', '132456', '2018-05-25 23:50:05.302'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(5, 30005522, 2, 250, 15, 1, '132456', '2018-05-25 22:58:22.074', '132456', '2018-05-25 23:50:05.307'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(6, 30005522, 3, 100, 15, 1, '132456', '2018-05-25 22:58:22.075', '132456', '2018-05-25 23:50:05.312'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(7, 30005522, 1, 50, 14, 5, '132456', '2018-05-25 22:58:22.076', '132456', '2018-05-25 23:50:05.318'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(21, 30005530, 1, 1250, 15, 1, '132456', '2018-05-25 23:55:44.373', '132456', '2018-05-26 00:06:07.334'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(22, 30005530, 2, 250, 15, 1, '132456', '2018-05-25 23:55:44.393', '132456', '2018-05-26 00:06:07.340'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(23, 30005530, 1, 50, 14, 5, '132456', '2018-05-25 23:55:44.395', '132456', '2018-05-26 00:06:07.344'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(55, 30005540, 1, 350, 15, 1, '132456', '2018-05-25 22:53:29.095', '132456', '2018-05-25 23:36:58.418'); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(56, 30005540, 2, 150, 15, 1, '132456', '2018-05-25 22:53:29.104', '132456', '2018-05-25 23:36:58.428'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125200, 13, 30005520, NULL, 132456, '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 23:37:01.627'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125201, 13, 30005520, NULL, 22770213, '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 23:37:01.688'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(175201, 1, 30005520, NULL, 132458, '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 23:37:01.688'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125202, 13, 30005521, NULL, 132456, '132456', '2018-05-25 22:55:21.597', '132456', '2018-05-25 22:55:21.597'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125203, 13, 30005521, NULL, 22770213, '132456', '2018-05-25 22:55:21.614', '132456', '2018-05-25 22:55:21.614'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125204, 1, 30005521, NULL, 132458, '132458', '2018-05-25 22:55:22.218', '132458', '2018-05-25 22:55:22.218'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125205, 1, 30005521, NULL, 124916, '124916', '2018-05-25 22:55:22.320', '124916', '2018-05-25 22:55:22.320'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125206, 1, 30005521, NULL, 124776, '124776', '2018-05-25 22:55:22.395', '124776', '2018-05-25 22:55:45.140'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125207, 21, 30005521, 95244, 132456, '132456', '2018-05-25 22:55:45.260', '132456', '2018-05-25 22:55:45.260'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125208, 13, 30005522, NULL, 132456, '132456', '2018-05-25 22:58:22.165', '132456', '2018-05-25 23:50:06.658'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125209, 13, 30005522, NULL, 22770213, '132456', '2018-05-25 22:58:22.180', '132456', '2018-05-25 23:50:06.709'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125210, 17, 30005522, NULL, 132456, '132456', '2018-05-25 22:58:22.688', '132456', '2018-05-25 23:50:06.770'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125220, 13, 30005530, NULL, 132456, '132456', '2018-05-25 23:55:44.609', '132456', '2018-05-25 23:55:44.609'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125221, 13, 30005530, NULL, 22770213, '132456', '2018-05-25 23:55:44.647', '132456', '2018-05-25 23:55:44.647'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125222, 17, 30005530, NULL, 132456, '132456', '2018-05-25 23:55:45.557', '132456', '2018-05-25 23:55:45.850'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125223, 18, 30005530, 95281, 132458, '132456', '2018-05-26 02:47:33.000', '132456', '2018-05-26 02:47:33.000'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125224, 1, 30005530, 95284, 124764, '132456', '2018-05-26 03:06:13.000', '132456', '2018-05-26 03:06:13.000'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125225, 1, 30005530, 95284, 124772, '132456', '2018-05-26 03:07:02.000', '132456', '2018-05-26 03:07:02.000'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125226, 13, 30005540, NULL, 132456, '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 23:37:01.627'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125227, 13, 30005540, NULL, 22770213, '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 23:37:01.688'); -INSERT INTO tcs_catalog:informix.resource -(resource_id, resource_role_id, project_id, project_phase_id, user_id, create_user, create_date, modify_user, modify_date) -VALUES(125228, 1, 30005540, NULL, 132458, '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 23:37:01.688'); - - -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125226, 6, '05.25.2018 10:53 PM', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125226, 2, 'heffan', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125226, 1, '132456', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125226, 8, 'N/A', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125227, 6, '05.25.2018 10:53 PM', '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 22:53:29.243'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125227, 2, 'Applications', '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 22:53:29.243'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125227, 1, '22770213', '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 22:53:29.243'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125227, 8, 'N/A', '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 22:53:29.243'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125228, 2, 'user', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125228, 1, '132458', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125228, 8, 'N/A', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); - -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125200, 6, '05.25.2018 10:53 PM', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125200, 2, 'heffan', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125200, 1, '132456', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125200, 8, 'N/A', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); - -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(175201, 2, 'user', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(175201, 1, '132458', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(175201, 8, 'N/A', '132456', '2018-05-25 22:53:29.218', '132456', '2018-05-25 22:53:29.218'); - - -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125201, 6, '05.25.2018 10:53 PM', '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 22:53:29.243'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125201, 2, 'Applications', '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 22:53:29.243'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125201, 1, '22770213', '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 22:53:29.243'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125201, 8, 'N/A', '132456', '2018-05-25 22:53:29.243', '132456', '2018-05-25 22:53:29.243'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125202, 6, '05.25.2018 10:55 PM', '132456', '2018-05-25 22:55:21.597', '132456', '2018-05-25 22:55:21.597'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125202, 2, 'heffan', '132456', '2018-05-25 22:55:21.597', '132456', '2018-05-25 22:55:21.597'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125202, 1, '132456', '132456', '2018-05-25 22:55:21.597', '132456', '2018-05-25 22:55:21.597'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125202, 8, 'N/A', '132456', '2018-05-25 22:55:21.597', '132456', '2018-05-25 22:55:21.597'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125203, 6, '05.25.2018 10:55 PM', '132456', '2018-05-25 22:55:21.614', '132456', '2018-05-25 22:55:21.614'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125203, 2, 'Applications', '132456', '2018-05-25 22:55:21.614', '132456', '2018-05-25 22:55:21.614'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125203, 1, '22770213', '132456', '2018-05-25 22:55:21.614', '132456', '2018-05-25 22:55:21.614'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125203, 8, 'N/A', '132456', '2018-05-25 22:55:21.614', '132456', '2018-05-25 22:55:21.614'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125204, 2, 'user', '132458', '2018-05-25 22:55:22.218', '132458', '2018-05-25 22:55:22.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125204, 6, '05.25.2018 10:55 PM', '132458', '2018-05-25 22:55:22.218', '132458', '2018-05-25 22:55:22.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125204, 1, '132458', '132458', '2018-05-25 22:55:22.218', '132458', '2018-05-25 22:55:22.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125204, 8, 'No', '132458', '2018-05-25 22:55:22.218', '132458', '2018-05-25 22:55:22.218'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125205, 2, 'Yoshi', '124916', '2018-05-25 22:55:22.320', '124916', '2018-05-25 22:55:22.320'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125205, 6, '05.25.2018 10:55 PM', '124916', '2018-05-25 22:55:22.320', '124916', '2018-05-25 22:55:22.320'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125205, 1, '124916', '124916', '2018-05-25 22:55:22.320', '124916', '2018-05-25 22:55:22.320'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125205, 8, 'No', '124916', '2018-05-25 22:55:22.320', '124916', '2018-05-25 22:55:22.320'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125206, 2, 'sandking', '124776', '2018-05-25 22:55:22.395', '124776', '2018-05-25 22:55:22.395'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125206, 6, '05.25.2018 10:55 PM', '124776', '2018-05-25 22:55:22.395', '124776', '2018-05-25 22:55:22.395'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125206, 1, '124776', '124776', '2018-05-25 22:55:22.395', '124776', '2018-05-25 22:55:22.395'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125206, 8, 'No', '124776', '2018-05-25 22:55:22.395', '124776', '2018-05-25 22:55:22.395'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125207, 6, '05.25.2018 10:55 PM', '132456', '2018-05-25 22:55:45.260', '132456', '2018-05-25 22:55:45.260'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125207, 2, 'heffan', '132456', '2018-05-25 22:55:45.260', '132456', '2018-05-25 22:55:45.260'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125207, 1, '132456', '132456', '2018-05-25 22:55:45.260', '132456', '2018-05-25 22:55:45.260'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125207, 8, 'N/A', '132456', '2018-05-25 22:55:45.260', '132456', '2018-05-25 22:55:45.260'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125207, 15, 'true', '132456', '2018-05-25 22:55:45.260', '132456', '2018-05-25 22:55:45.260'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125207, 7, 'N/A', '132456', '2018-05-25 22:55:45.260', '132456', '2018-05-25 22:55:45.260'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125208, 6, '05.25.2018 10:58 PM', '132456', '2018-05-25 22:58:22.165', '132456', '2018-05-25 22:58:22.165'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125208, 2, 'heffan', '132456', '2018-05-25 22:58:22.165', '132456', '2018-05-25 22:58:22.165'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125208, 1, '132456', '132456', '2018-05-25 22:58:22.165', '132456', '2018-05-25 22:58:22.165'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125208, 8, 'N/A', '132456', '2018-05-25 22:58:22.165', '132456', '2018-05-25 22:58:22.165'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125209, 6, '05.25.2018 10:58 PM', '132456', '2018-05-25 22:58:22.180', '132456', '2018-05-25 22:58:22.180'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125209, 2, 'Applications', '132456', '2018-05-25 22:58:22.180', '132456', '2018-05-25 22:58:22.180'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125209, 1, '22770213', '132456', '2018-05-25 22:58:22.180', '132456', '2018-05-25 22:58:22.180'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125209, 8, 'N/A', '132456', '2018-05-25 22:58:22.180', '132456', '2018-05-25 22:58:22.180'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125210, 2, 'heffan', '132456', '2018-05-25 22:58:22.688', '132456', '2018-05-25 22:58:22.688'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125210, 6, '05.25.2018 10:58 PM', '132456', '2018-05-25 22:58:22.688', '132456', '2018-05-25 22:58:22.688'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125210, 1, '132456', '132456', '2018-05-25 22:58:22.688', '132456', '2018-05-25 22:58:22.688'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125210, 8, 'N/A', '132456', '2018-05-25 22:58:22.688', '132456', '2018-05-25 22:58:22.688'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125220, 6, '05.25.2018 11:55 PM', '132456', '2018-05-25 23:55:44.609', '132456', '2018-05-25 23:55:44.609'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125220, 2, 'heffan', '132456', '2018-05-25 23:55:44.609', '132456', '2018-05-25 23:55:44.609'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125220, 1, '132456', '132456', '2018-05-25 23:55:44.609', '132456', '2018-05-25 23:55:44.609'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125220, 8, 'N/A', '132456', '2018-05-25 23:55:44.609', '132456', '2018-05-25 23:55:44.609'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125221, 6, '05.25.2018 11:55 PM', '132456', '2018-05-25 23:55:44.647', '132456', '2018-05-25 23:55:44.647'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125221, 2, 'Applications', '132456', '2018-05-25 23:55:44.647', '132456', '2018-05-25 23:55:44.647'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125221, 1, '22770213', '132456', '2018-05-25 23:55:44.647', '132456', '2018-05-25 23:55:44.647'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125221, 8, 'N/A', '132456', '2018-05-25 23:55:44.647', '132456', '2018-05-25 23:55:44.647'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125222, 2, 'heffan', '132456', '2018-05-25 23:55:45.557', '132456', '2018-05-25 23:55:45.557'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125222, 6, '05.25.2018 11:55 PM', '132456', '2018-05-25 23:55:45.557', '132456', '2018-05-25 23:55:45.557'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125222, 1, '132456', '132456', '2018-05-25 23:55:45.557', '132456', '2018-05-25 23:55:45.557'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125222, 8, 'N/A', '132456', '2018-05-25 23:55:45.557', '132456', '2018-05-25 23:55:45.557'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125223, 1, '132458', '132456', '2018-05-26 03:03:05.000', '132456', '2018-05-26 03:03:05.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125223, 2, 'user', '132456', '2018-05-26 03:03:05.000', '132456', '2018-05-26 03:03:05.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125223, 6, '05.25.2018 11:55 PM', '132456', '2018-05-26 03:03:05.000', '132456', '2018-05-26 03:03:05.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125223, 8, 'N/A', '132456', '2018-05-26 03:03:05.000', '132456', '2018-05-26 03:03:05.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125224, 1, '124764', '132456', '2018-05-26 03:06:14.000', '132456', '2018-05-26 03:06:14.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125224, 2, 'Hung', '132456', '2018-05-26 03:06:14.000', '132456', '2018-05-26 03:06:14.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125224, 6, '05.25.2018 11:55 PM', '132456', '2018-05-26 03:06:14.000', '132456', '2018-05-26 03:06:14.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125224, 8, 'N/A', '132456', '2018-05-26 03:06:14.000', '132456', '2018-05-26 03:06:14.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125225, 1, '124772', '132456', '2018-05-26 03:07:02.000', '132456', '2018-05-26 03:07:02.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125225, 2, 'Partha', '132456', '2018-05-26 03:07:02.000', '132456', '2018-05-26 03:07:02.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125225, 6, '05.25.2018 11:55 PM', '132456', '2018-05-26 03:07:02.000', '132456', '2018-05-26 03:07:02.000'); -INSERT INTO tcs_catalog:informix.resource_info -(resource_id, resource_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(125225, 8, 'N/A', '132456', '2018-05-26 03:07:02.000', '132456', '2018-05-26 03:07:02.000'); -INSERT INTO tcs_catalog:informix.upload -(upload_id, project_id, project_phase_id, resource_id, upload_type_id, upload_status_id, parameter, upload_desc, create_user, create_date, modify_user, modify_date) -VALUES(91260, 30005521, 95245, 125206, 1, 1, 'e8560c0a_mock.zip', NULL, '124776', '2018-05-25 22:55:45.108', '132456', '2018-05-25 22:55:45.438'); -INSERT INTO tcs_catalog:informix.upload -(upload_id, project_id, project_phase_id, resource_id, upload_type_id, upload_status_id, parameter, upload_desc, create_user, create_date, modify_user, modify_date) -VALUES(91261, 30005522, 95256, 125210, 1, 1, 'c5dd8561_specification6431827689655589331.txt', NULL, '132456', '2018-05-25 22:58:22.857', '132456', '2018-05-25 22:58:22.857'); -INSERT INTO tcs_catalog:informix.upload -(upload_id, project_id, project_phase_id, resource_id, upload_type_id, upload_status_id, parameter, upload_desc, create_user, create_date, modify_user, modify_date) -VALUES(91270, 30005530, 95280, 125222, 1, 1, 'aa0d6281_specification2100387308896185926.txt', NULL, '132456', '2018-05-25 23:55:45.817', '132456', '2018-05-25 23:55:45.817'); -INSERT INTO tcs_catalog:informix.upload -(upload_id, project_id, project_phase_id, resource_id, upload_type_id, upload_status_id, parameter, upload_desc, create_user, create_date, modify_user, modify_date) -VALUES(91271, 30005530, 95287, 125224, 1, 1, 'dummy.txt', NULL, '132456', '2018-05-26 03:22:52.000', '132456', '2018-05-26 03:22:52.000'); -INSERT INTO tcs_catalog:informix.upload -(upload_id, project_id, project_phase_id, resource_id, upload_type_id, upload_status_id, parameter, upload_desc, create_user, create_date, modify_user, modify_date) -VALUES(91272, 30005530, 95283, 125224, 1, 1, 'dummy.txt', NULL, '132456', '2018-05-26 03:25:43.000', '132456', '2018-05-26 03:25:43.000'); -INSERT INTO tcs_catalog:informix.submission -(submission_id, upload_id, submission_status_id, screening_score, initial_score, final_score, placement, submission_type_id, create_user, create_date, modify_user, modify_date, user_rank, mark_for_purchase, prize_id, file_size, view_count, system_file_name, thurgood_job_id) -VALUES(54480, 91260, 1, NULL, 100.00, 100.00, 1, 1, '124776', '2018-05-25 22:55:45.123', '132456', '2018-05-25 22:55:45.241', 1, 'f', 3, NULL, NULL, NULL, NULL); -INSERT INTO tcs_catalog:informix.submission -(submission_id, upload_id, submission_status_id, screening_score, initial_score, final_score, placement, submission_type_id, create_user, create_date, modify_user, modify_date, user_rank, mark_for_purchase, prize_id, file_size, view_count, system_file_name, thurgood_job_id) -VALUES(54481, 91261, 1, NULL, NULL, NULL, NULL, 2, '132456', '2018-05-25 22:58:22.860', '132456', '2018-05-25 22:58:22.860', 1, 'f', NULL, NULL, NULL, NULL, NULL); -INSERT INTO tcs_catalog:informix.submission -(submission_id, upload_id, submission_status_id, screening_score, initial_score, final_score, placement, submission_type_id, create_user, create_date, modify_user, modify_date, user_rank, mark_for_purchase, prize_id, file_size, view_count, system_file_name, thurgood_job_id) -VALUES(54490, 91270, 1, NULL, NULL, NULL, NULL, 2, '132456', '2018-05-25 23:55:45.838', '132456', '2018-05-25 23:55:45.838', 1, 'f', NULL, NULL, NULL, NULL, NULL); -INSERT INTO tcs_catalog:informix.submission -(submission_id, upload_id, submission_status_id, screening_score, initial_score, final_score, placement, submission_type_id, create_user, create_date, modify_user, modify_date, user_rank, mark_for_purchase, prize_id, file_size, view_count, system_file_name, thurgood_job_id) -VALUES(54491, 91271, 1, 100.00, 100.00, 100.00, 1, 1, '132456', '2018-05-26 03:22:52.000', '132456', '2018-05-26 03:22:52.000', NULL, NULL, 21, NULL, NULL, NULL, NULL); -INSERT INTO tcs_catalog:informix.submission -(submission_id, upload_id, submission_status_id, screening_score, initial_score, final_score, placement, submission_type_id, create_user, create_date, modify_user, modify_date, user_rank, mark_for_purchase, prize_id, file_size, view_count, system_file_name, thurgood_job_id) -VALUES(54492, 91272, 1, 100.00, 100.00, 100.00, 1, 3, '132456', '2018-05-26 03:25:43.000', '132456', '2018-05-26 03:25:43.000', NULL, NULL, 23, NULL, NULL, NULL, NULL); -INSERT INTO tcs_catalog:informix.resource_submission -(resource_id, submission_id, create_user, create_date, modify_user, modify_date) -VALUES(125206, 54480, '124776', '2018-05-25 22:55:22.395', '124776', '2018-05-25 22:55:45.140'); -INSERT INTO tcs_catalog:informix.resource_submission -(resource_id, submission_id, create_user, create_date, modify_user, modify_date) -VALUES(125210, 54481, '132456', '2018-05-25 22:58:22.688', '132456', '2018-05-25 23:50:06.770'); -INSERT INTO tcs_catalog:informix.resource_submission -(resource_id, submission_id, create_user, create_date, modify_user, modify_date) -VALUES(125222, 54490, '132456', '2018-05-25 23:55:45.557', '132456', '2018-05-25 23:55:45.850'); -INSERT INTO tcs_catalog:informix.review -(review_id, resource_id, submission_id, project_phase_id, scorecard_id, committed, score, initial_score, create_user, create_date, modify_user, modify_date) -VALUES(71490, 125207, 54480, 95244, 30000419, 1, 100, 100.00, '125207', '2018-05-25 22:55:44.000', '125207', '2018-05-25 22:55:44.000'); -INSERT INTO tcs_catalog:informix.review_auction -(review_auction_id, project_id, review_auction_type_id) -VALUES(1, 30005520, 5); -INSERT INTO tcs_catalog:informix.review_auction -(review_auction_id, project_id, review_auction_type_id) -VALUES(2, 30005521, 4); -INSERT INTO tcs_catalog:informix.review_item -(review_item_id, review_id, scorecard_question_id, upload_id, answer, sort, create_user, create_date, modify_user, modify_date) -VALUES(2186570, 71490, 30003115, NULL, '10', 0, '125207', '2018-05-25 22:55:44.000', '125207', '2018-05-25 22:55:44.000'); - -INSERT INTO tcs_catalog:informix.contest_milestone_xref -(contest_id, project_milestone_id, create_user, create_date, modify_user, modify_date) -VALUES(30005522, 1, '132456', '2018-05-25 22:58:22.231', '132456', '2018-05-25 22:58:22.231'); -INSERT INTO tcs_catalog:informix.contest_milestone_xref -(contest_id, project_milestone_id, create_user, create_date, modify_user, modify_date) -VALUES(30005530, 1, '132456', '2018-05-25 23:55:44.819', '132456', '2018-05-25 23:55:44.819'); - -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(24, 30005530, 1, 1000, 16, 1, '132456', current, '132456', current); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(25, 30005530, 2, 500, 16, 1, '132456', current, '132456', current); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(26, 30005522, 1, 900, 16, 1, '132456', current, '132456', current); -INSERT INTO tcs_catalog:informix.prize -(prize_id, project_id, place, prize_amount, prize_type_id, number_of_submissions, create_user, create_date, modify_user, modify_date) -VALUES(27, 30005522, 2, 450, 16, 1, '132456', current, '132456', current); - -UPDATE id_sequences SET next_block_start = 60000 WHERE name = 'upload_id_seq'; -UPDATE id_sequences SET next_block_start = 93000 WHERE name = 'submission_id_seq'; - -alter table upload add url lvarchar(1000); - -database common_oltp; -update id_sequences set next_block_start = 100000 where name = 'project_phase_id_seq'; -update id_sequences set next_block_start = 40005530 where name = 'project_id_seq'; -update id_sequences set next_block_start = 1000 where name = 'prize_id_seq'; -update id_sequences set next_block_start = 2000 where name = 'PROJECT_SPEC_ID_SEQ'; -update id_sequences set next_block_start = 200000 where name = 'resource_id_seq'; -update id_sequences set next_block_start = 5000 where name = 'COMPCATEGORY_SEQ'; -update id_sequences set next_block_start = 3000 where name = 'TECHNOLOGY_SEQ'; - - -database corporate_oltp; -INSERT INTO informix.tc_direct_project (project_id,name,description,project_status_id,user_id, create_date,modify_date) VALUES ( -1247,'Project 3','Project 3 desc',1,132456, current, current); - - -database informixoltp; -INSERT INTO contest(contest_id, name) VALUES(2001, 'test contest 2001'); -INSERT INTO round(round_id, contest_id, name, round_type_id) VALUES(2001, 2001, 'test round 2001', 13); -INSERT INTO round_segment(round_id, segment_id, start_time, end_time, status) VALUES(2001, 1, '2018-12-1 12:00:00', '2018-12-6 12:00:00', 'A'); -INSERT INTO round_segment(round_id, segment_id, start_time, end_time, status) VALUES(2001, 5, '2018-12-15 12:00:00', '2018-12-25 12:00:00', 'A'); - -INSERT INTO problem(problem_id, name) VALUES(2001, 'test problem'); -INSERT INTO component(component_id, problem_id, result_type_id, method_name, class_name) VALUES(2001, 2001, 1, 'test method', 'test class'); -INSERT INTO division(division_id, division_desc) VALUES(100, 'test division'); -INSERT INTO round_component(round_id, component_id, division_id) VALUES(2001, 2001, 100); - -INSERT INTO round_registration(round_id, coder_id, timestamp) VALUES(2001, 132458, '2018-12-12 18:10:37'); -INSERT INTO long_component_state(long_component_state_id, round_id, component_id, coder_id) VALUES(3001, 2001, 2001, 132458); -INSERT INTO long_compilation(long_component_state_id, open_time, language_id) VALUES(3001, 1543719058841, 1); - -database tcs_catalog; -INSERT INTO project(project_id, project_status_id, project_category_id, create_user, create_date, modify_user, modify_date, tc_direct_project_id) -VALUES(30054163, 1, 37, 132456, current, 132456, current, 1247); - -INSERT INTO informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30054163, 56, 2001, '132456', current, '132456', current); -INSERT INTO informix.project_info -(project_id, project_info_type_id, value, create_user, create_date, modify_user, modify_date) -VALUES(30054163, 28, 'true', '132456', current, '132456', current); +VALUES(30054164, 28, 'true', '132456', current, '132456', current); diff --git a/test/test_files/Test.java b/test/test_files/Test.java deleted file mode 100755 index b7b6951..0000000 --- a/test/test_files/Test.java +++ /dev/null @@ -1,5 +0,0 @@ -public class Test { - public static void main(String[] args) { - System.out.println("Hello, World"); - } -} \ No newline at end of file diff --git a/test/test_files/sqlParams.json b/test/test_files/sqlParams.json deleted file mode 100755 index 2bed6dd..0000000 --- a/test/test_files/sqlParams.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "informixoltp:long_component_state": { - "long_component_state_id": 3001, - "round_id": 2001, - "component_id": 2001 - }, - "informixoltp:long_submission": { - "long_component_state_id": 3001, - "open_time": 1543719058841, - "language_id": 1 - }, - "upload": { - "upload_id": 60000 - } -} \ No newline at end of file diff --git a/test/tests.js b/test/tests.js index 138b00c..6fe3da6 100755 --- a/test/tests.js +++ b/test/tests.js @@ -2,53 +2,31 @@ * Mocha tests of the Topcoder - Submission Legacy Processor Application. */ process.env.NODE_ENV = 'test' -require('../src/bootstrap') -const path = require('path') -const fs = require('fs') -const should = require('should') -const Kafka = require('no-kafka') +require('legacy-processor-module/bootstrap') + +const Axios = require('axios') const config = require('config') +const Kafka = require('no-kafka') +const should = require('should') + const _ = require('lodash') -const sqlParams = require('./test_files/sqlParams') -const logger = require('../src/common/logger') -// Start mock submission api +const logger = require('legacy-processor-module/common/logger') +const {getKafkaOptions} = require('legacy-processor-module/KafkaConsumer') +const {patchSubmission} = require('legacy-processor-module/LegacySubmissionIdService') +const {sleep, expectTable, clearSubmissions} = require('legacy-processor-module/test/TestHelper') + const { sampleSubmission, - sampleUpdateSubmission, sampleFinalFixSubmission, sampleStudioSubmission, sampleNotAllowMultipleSubmission, sampleNoChallengePropertiesSubmission, - sampleLegacyUpdateSubmission, - mockSubmissionApi -} = require('./mock-submission-api') -// Start mock server for challenge api and code url -const { mockServer } = require('./mock-api') -const Informix = require('legacy-processor-module/Informix') -// force to use in this way in test to make sure single instance work properly for same database/username/password -const informix = new Informix({ - database: config.DB_NAME, - username: config.DB_USERNAME, - password: config.DB_PASSWORD, - pool: { - min: 0, - max: 10 - } -}) -const prepare = fs.readFileSync(path.join(__dirname, './sql/prepare.sql'), 'utf-8') -/** - * Sleep with time from input - * @param time the time input - */ -async function sleep (time) { - await new Promise((resolve) => { - setTimeout(resolve, time) - }) -} + mockApi +} = require('legacy-processor-module/mock/mock-api') // Default timeout -const timeout = 2000 +const timeout = 1000 const header = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, originator: config.KAFKA_NEW_SUBMISSION_ORIGINATOR, @@ -63,15 +41,6 @@ const sampleMessage = { } } -// The good sample message -const sampleUpdateMessage = { - ...header, - topic: config.KAFKA_UPDATE_SUBMISSION_TOPIC, - payload: { - ...sampleUpdateSubmission - } -} - // The good final fix sample message const sampleFinalFixMessage = { ...header, @@ -104,66 +73,16 @@ const sampleNoChallengePropertiesMessage = { } } -// The good legacy submission update sample message -const sampleLegacyUpdateMessage = { - ...header, - topic: config.KAFKA_UPDATE_SUBMISSION_TOPIC, - timestamp: '2018-11-11T00:00:00', - payload: { - ...sampleLegacyUpdateSubmission - } -} - -const options = { - connectionString: config.KAFKA_URL, - groupId: config.KAFKA_GROUP_ID, - ssl: { - cert: config.KAFKA_CLIENT_CERT, - key: config.KAFKA_CLIENT_CERT_KEY - } -} +const options = getKafkaOptions() const producer = new Kafka.Producer(options) -/** - * Expect count of table rows with params - * @param table the table - * @param count the rows to expect - * @param params the sql params - */ -async function expectTable (table, count, params) { - // error to process TEXT column in where clause of select statement so have to use in this way - const textColumns = ['submissionText', 'submission_text'] - let tableParams = _.merge({}, sqlParams[table], _.omit(params, textColumns)) - params = params || {} - const checkParams = _.pick(params, textColumns) - const names = Object.keys(checkParams) - let sql = `select ${names.length ? names.join() : '*'} from ${table}` - if (!_.isEmpty(tableParams)) { - sql += ` where ${Object.keys(tableParams).map((k) => { - const v = tableParams[k] - if (_.isNull(v)) { - return `${k} is null` - } else { - return `${k}=@${k}@` - } - }).join(' and ')}` - } - const result = await informix.query(sql, tableParams) - should.equal(result.length, count, `Table ${table} got wrong expect count result expect ${count} actual ${result.length}`) - if (count && names.length) { - for (let i = 0; i < names.length; i++) { - should.equal(result[0][i], checkParams[names[i]], `Table ${table} got wrong expect column ${names[i]} expect ${checkParams[names[i]]} actual ${result[0][i]}`) - } - } -} describe('Topcoder - Submission Legacy Processor Application', () => { // Inject the logger to validate the message let logMessages = [] let consumer - ['debug', 'error', 'warn'].forEach((level) => { + ['debug', 'info', 'error', 'warn'].forEach((level) => { logger[level] = (message) => { logMessages.push(message) - // logger.info(`Guri has ${message}`) } }) /** @@ -200,8 +119,7 @@ describe('Topcoder - Submission Legacy Processor Application', () => { }) }) before(async () => { - await startServer(mockSubmissionApi, config.MOCK_SUBMISSION_API_PORT) - await startServer(mockServer, config.MOCK_SERVER_PORT) + await startServer(mockApi, config.MOCK_API_PORT) // consume not processed messages before test const groupConsumer = new Kafka.GroupConsumer(options) await groupConsumer.init([{ @@ -217,20 +135,12 @@ describe('Topcoder - Submission Legacy Processor Application', () => { consumer = require('../index') // Make sure producer, consumer has enough time to initialize await sleep(5000) - try { - // currently error to process TEXT column in where clause of select statement so even pass param rightly it will throw error - // I add here to test no param found in params error too - await informix.query('select * from long_submission where submission_text=@submission_text@', { test: 'text' }) - throw new Error('should throw error') - } catch (e) { - e.message.should.match(/Not found param name submission_text in given params/) - } }) after(async () => { + await clearSubmissions() // close server - await closeServer(mockSubmissionApi) - await closeServer(mockServer) + await closeServer(mockApi) try { await producer.end() } catch (err) { @@ -244,10 +154,16 @@ describe('Topcoder - Submission Legacy Processor Application', () => { }) beforeEach(async () => { - await informix.query(prepare) logMessages = [] }) + it('Should setup healthcheck with check on kafka connection', async () => { + const healthcheckEndpoint = `http://localhost:${process.env.PORT || 3000}/health` + let result = await Axios.get(healthcheckEndpoint) + should.equal(result.status, 200) + should.deepEqual(result.data, { checksRun: 1 }) + }) + it('should not consume message from a different topic', async () => { await producer.send({ topic: 'different-topic', message: { value: 'message' } }) await sleep(timeout) @@ -332,7 +248,7 @@ describe('Topcoder - Submission Legacy Processor Application', () => { const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` logMessages.length.should.be.greaterThanOrEqual(3) should.equal(logMessages[0], `Received ${messageInfo}`) - should.equal(logMessages[1], 'Skipped invalid event, reasons: "timestamp" must be a number of milliseconds or valid date string, "id" must be a positive number, "id" must be a string, "challengeId" must be a number, "memberId" must be a number, "url" must be a valid uri, "type" must be a string') + should.equal(logMessages[1], 'Skipped invalid event, reasons: "timestamp" must be a number of milliseconds or valid date string, "id" must be a positive number, "id" must be a string, "challengeId" must be a number, "memberId" must be a number, "type" must be a string, "url" must be a valid uri') should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) @@ -408,7 +324,7 @@ describe('Topcoder - Submission Legacy Processor Application', () => { const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` logMessages.length.should.be.greaterThanOrEqual(3) should.equal(logMessages[0], `Received ${messageInfo}`) - should.equal(logMessages[1], 'Skipped invalid event, reasons: "resource" must be one of [submission], "resource" must be one of [review]') + should.equal(logMessages[1], 'Skipped invalid event, reasons: "resource" must be one of [submission], "resource" must be one of [review], "resource" must be one of [reviewSummation]') should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) @@ -652,94 +568,100 @@ describe('Topcoder - Submission Legacy Processor Application', () => { should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) - it('should log error if the submission-api is unreachable', async () => { - await closeServer(mockSubmissionApi) - const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleMessage) } } - const results = await producer.send(m) + it('should skip new submission(not found subTrack) message', async () => { + const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(_.merge({}, sampleMessage, { payload: { challengeId: 60005521 } })) } } + logMessages = [] + let results = await producer.send(m) await waitJob() - await startServer(mockSubmissionApi, config.MOCK_SUBMISSION_API_PORT) - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) + let messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` + logMessages.length.should.be.greaterThanOrEqual(5) should.equal(logMessages[0], `Received ${messageInfo}`) - should.ok(logMessages.find(x => x.startsWith(`Failed to handle ${messageInfo}: connect ECONNREFUSED`) || - x.startsWith(`Failed to handle ${messageInfo}: getaddrinfo ENOTFOUND`) - )) - should.ok(logMessages.find(x => x.startsWith('{ Error: connect ECONNREFUSED') || x.startsWith('{ Error: getaddrinfo ENOTFOUND'))) - should.ok(logMessages.find(x => x.startsWith(`Failed to handle ${messageInfo}`))) + should.ok(logMessages.find(x => x.startsWith('Skipped event for subTrack: '))) + should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) }) - it('should handle message successfully - unknown keys', async () => { - const m = { - topic: config.KAFKA_NEW_SUBMISSION_TOPIC, - message: { - value: JSON.stringify(_.merge({}, sampleMessage, { - payload: { - extraKey: 'extraKey' - } - })) - } - } - const results = await producer.send(m) + it('should skip new submission of MM challenge message', async () => { + const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(_.merge({}, sampleMessage, { payload: { challengeId: 30054163 } })) } } + logMessages = [] + let results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(6) + let messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` + logMessages.length.should.be.greaterThanOrEqual(5) should.equal(logMessages[0], `Received ${messageInfo}`) - should.ok(logMessages.find(x => x.startsWith('PATCH /submissions/111'))) + should.ok(logMessages.find(x => x.startsWith('Skipped event for subTrack: DEVELOP_MARATHON_MATCH'))) should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) }) it('should handle new submission message successfully', async () => { - const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleMessage) } } + await clearSubmissions() + + let m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleMessage) } } const results = await producer.send(m) await waitJob() const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` logMessages.length.should.be.greaterThanOrEqual(6) should.equal(logMessages[0], `Received ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith(`Patched to the Submission API: id ${sampleMessage.payload.id}`))) should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + + await expectTable('upload', 1, { + project_id: sampleMessage.payload.challengeId, + project_phase_id: sampleMessage.payload.submissionPhaseId, + url: sampleMessage.payload.url + }) + await expectTable('submission', 1) + await expectTable('resource_submission', 1) + + // Send another one with extra keys + m = { + topic: config.KAFKA_NEW_SUBMISSION_TOPIC, + message: { + value: JSON.stringify(_.merge({}, sampleMessage, { + payload: { + extraKey: 'extraKey' + } + })) + } + } + await producer.send(m) + await waitJob() + + await expectTable('upload', 2, { + project_id: sampleMessage.payload.challengeId, + project_phase_id: sampleMessage.payload.submissionPhaseId, + url: sampleMessage.payload.url + }) + await expectTable('submission', 2) + await expectTable('resource_submission', 2) }) it('should handle final fix message successfully', async () => { + await clearSubmissions() + const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleFinalFixMessage) } } const results = await producer.send(m) await waitJob() const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` logMessages.length.should.be.greaterThanOrEqual(6) should.equal(logMessages[0], `Received ${messageInfo}`) - should.ok(logMessages.find(x => x.startsWith('{"legacyUploadId":'))) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) - }) - - it('should handle update submission message successfully', async () => { - const m = { topic: config.KAFKA_UPDATE_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleUpdateMessage) } } - const results = await producer.send(m) - await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(4) - should.equal(logMessages[0], `Received ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith(`Patched to the Submission API: id ${sampleFinalFixMessage.payload.id}`))) + should.ok(logMessages.find(x => x.includes('{"legacyUploadId":'))) should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) - }) - it('should handle update submission message(newer with legacySubmissionId) successfully', async () => { - const url = sampleLegacyUpdateMessage.payload.url - await expectTable('upload', 0, { - url - }) - logMessages = [] - const m = { topic: config.KAFKA_UPDATE_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleLegacyUpdateMessage) } } - const results = await producer.send(m) - await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(4) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) await expectTable('upload', 1, { - url + project_id: sampleFinalFixMessage.payload.challengeId, + project_phase_id: sampleFinalFixMessage.payload.submissionPhaseId, + url: sampleFinalFixMessage.payload.url }) + await expectTable('submission', 0) + await expectTable('resource_submission', 0) }) it('should handle new studio submission message successfully', async () => { + await clearSubmissions() + const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleStudioMessage) } } logMessages = [] let results = await producer.send(m) @@ -747,11 +669,20 @@ describe('Topcoder - Submission Legacy Processor Application', () => { let messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` logMessages.length.should.be.greaterThanOrEqual(6) should.equal(logMessages[0], `Received ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith(`Patched to the Submission API: id ${sampleStudioMessage.payload.id}`))) should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + + await expectTable('upload', 1, { + project_id: sampleStudioMessage.payload.challengeId, + project_phase_id: sampleStudioMessage.payload.submissionPhaseId, + url: sampleStudioMessage.payload.url + }) + await expectTable('submission', 1) + await expectTable('resource_submission', 1) }) - it('should handle new not allow multiple submission message successfully', async () => { + it('should handle new submission message which not allow multiple submissions successfully', async () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleNotAllowMultipleMessage) } } logMessages = [] let results = await producer.send(m) @@ -759,15 +690,33 @@ describe('Topcoder - Submission Legacy Processor Application', () => { let messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` logMessages.length.should.be.greaterThanOrEqual(6) should.equal(logMessages[0], `Received ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith(`Patched to the Submission API: id ${sampleNotAllowMultipleMessage.payload.id}`))) + should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + + await expectTable('upload', 1, { + project_id: sampleNotAllowMultipleMessage.payload.challengeId, + project_phase_id: sampleNotAllowMultipleMessage.payload.submissionPhaseId, + upload_status_id: 1 + }) + // send second time + logMessages = [] results = await producer.send(m) await waitJob() messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` + should.ok(logMessages.find(x => x.startsWith(`Patched to the Submission API: id ${sampleNotAllowMultipleMessage.payload.id}`))) + should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + + await expectTable('upload', 1, { + project_id: sampleNotAllowMultipleMessage.payload.challengeId, + project_phase_id: sampleNotAllowMultipleMessage.payload.submissionPhaseId, + upload_status_id: 1 + }) }) - it('should handle new submission without challenge properties message successfully', async () => { + it('should log error for new submission without challenge properties', async () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleNoChallengePropertiesMessage) } } logMessages = [] let results = await producer.send(m) @@ -776,18 +725,110 @@ describe('Topcoder - Submission Legacy Processor Application', () => { logMessages.length.should.be.greaterThanOrEqual(4) should.equal(logMessages[0], `Received ${messageInfo}`) should.ok(logMessages.find(x => x.startsWith(`Failed to handle ${messageInfo}`))) - should.ok(logMessages.find(x => x.includes('null or empty result get challenge properties'))) + should.ok(logMessages.find(x => x.includes('Error: null or empty result get challenge properties'))) + }) + + it('should log error if the submission-api is unreachable', async () => { + await closeServer(mockApi) + const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleMessage) } } + const results = await producer.send(m) + await waitJob() + await startServer(mockApi, config.MOCK_API_PORT) + const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` + logMessages.length.should.be.greaterThanOrEqual(3) + should.equal(logMessages[0], `Received ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith(`Failed to handle ${messageInfo}: connect ECONNREFUSED`) || + x.startsWith(`Failed to handle ${messageInfo}: getaddrinfo ENOTFOUND`) + )) + should.ok(logMessages.find(x => x.startsWith('{ Error: connect ECONNREFUSED') || x.startsWith('{ Error: getaddrinfo ENOTFOUND'))) + should.ok(logMessages.find(x => x.startsWith(`Failed to handle ${messageInfo}`))) + }) + + it('should handle update submission message successfully', async () => { + await clearSubmissions() + + await producer.send({ topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleMessage) } }) + await waitJob() + + await patchSubmission(sampleMessage.payload.id, {legacySubmissionId: null}) + + await expectTable('upload', 1, { + project_id: sampleMessage.payload.challengeId, + project_phase_id: sampleMessage.payload.submissionPhaseId, + url: sampleMessage.payload.url + }) + + const updatedUrl = 'http://content.topcoder.com/some/path/updated' + const m = { + topic: config.KAFKA_UPDATE_SUBMISSION_TOPIC, + message: { + value: JSON.stringify(_.merge({}, sampleMessage, { + topic: config.KAFKA_UPDATE_SUBMISSION_TOPIC, + payload: { + url: updatedUrl + } + })) + } + } + + logMessages = [] + const results = await producer.send(m) + await waitJob() + const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` + logMessages.length.should.be.greaterThanOrEqual(4) + should.equal(logMessages[0], `Received ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith('no valid submission id'))) + should.ok(logMessages.find(x => x.startsWith('Submission url updated, legacy submission id : 0'))) + should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) + should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + + await expectTable('upload', 1, { + project_id: sampleMessage.payload.challengeId, + project_phase_id: sampleMessage.payload.submissionPhaseId, + url: updatedUrl + }) }) - it('should handle new submission(not found subTrack) message successfully', async () => { - const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(_.merge({}, sampleFinalFixMessage, { payload: { challengeId: 60005521 } })) } } + it('should handle update submission message(newer with legacySubmissionId) successfully', async () => { + await clearSubmissions() + + await producer.send({ topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleMessage) } }) + await waitJob() + + await expectTable('upload', 1, { + project_id: sampleMessage.payload.challengeId, + project_phase_id: sampleMessage.payload.submissionPhaseId, + url: sampleMessage.payload.url + }) + + const updatedUrl = 'http://content.topcoder.com/some/path/legacyupdated' + const m = { + topic: config.KAFKA_UPDATE_SUBMISSION_TOPIC, + message: { + value: JSON.stringify(_.merge({}, sampleMessage, { + topic: config.KAFKA_UPDATE_SUBMISSION_TOPIC, + payload: { + url: updatedUrl + } + })) + } + } + logMessages = [] - let results = await producer.send(m) + const results = await producer.send(m) await waitJob() - let messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(6) + const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` + logMessages.length.should.be.greaterThanOrEqual(4) should.equal(logMessages[0], `Received ${messageInfo}`) + should.not.exist(logMessages.find(x => x.startsWith('no valid submission id'))) + should.ok(logMessages.find(x => x.startsWith('Submission url updated, legacy submission id'))) should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + + await expectTable('upload', 1, { + project_id: sampleMessage.payload.challengeId, + project_phase_id: sampleMessage.payload.submissionPhaseId, + url: updatedUrl + }) }) }) From fb730c839e2e55dcf6b0a6197ae16818a5a3713e Mon Sep 17 00:00:00 2001 From: liuliquan Date: Mon, 22 Apr 2019 17:04:47 +0800 Subject: [PATCH 2/5] update tc-core-library-js dependency --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index dce0d23..1241dcc 100755 --- a/package-lock.json +++ b/package-lock.json @@ -5471,7 +5471,7 @@ } }, "tc-core-library-js": { - "version": "github:appirio-tech/tc-core-library-js#d16413db30b1eed21c0cf426e185bedb2329ddab", + "version": "github:appirio-tech/tc-core-library-js#6cb5a71b16966222f4b30e96bbee79c73a5fd71e", "requires": { "auth0-js": "9.8.2", "axios": "0.12.0", diff --git a/package.json b/package.json index d316cc2..a3b8556 100755 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "joi": "^13.4.0", "lodash": "^4.17.10", "no-kafka": "^3.2.10", - "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6", + "tc-core-library-js": "appirio-tech/tc-core-library-js.git#feature/auth0-proxy-server", "topcoder-healthcheck-dropin": "^1.0.2", "winston": "^2.4.2" }, From ed27bb495e80a22d65841ebbf72f71f2274c83fb Mon Sep 17 00:00:00 2001 From: Dushyant Bhalgami Date: Tue, 14 May 2019 15:09:35 +0530 Subject: [PATCH 3/5] added try/catch block --- package.json | 2 +- src/services/SubmissionService.js | 159 +++++++++++++++++------------- 2 files changed, 93 insertions(+), 68 deletions(-) diff --git a/package.json b/package.json index a3b8556..d316cc2 100755 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "joi": "^13.4.0", "lodash": "^4.17.10", "no-kafka": "^3.2.10", - "tc-core-library-js": "appirio-tech/tc-core-library-js.git#feature/auth0-proxy-server", + "tc-core-library-js": "appirio-tech/tc-core-library-js.git#v2.6", "topcoder-healthcheck-dropin": "^1.0.2", "winston": "^2.4.2" }, diff --git a/src/services/SubmissionService.js b/src/services/SubmissionService.js index 60e2e5b..f2b62a8 100755 --- a/src/services/SubmissionService.js +++ b/src/services/SubmissionService.js @@ -1,12 +1,12 @@ /** * The service to handle new submission events for non-MM challenge. */ -const config = require('config') -const Joi = require('joi') +const config = require("config"); +const Joi = require("joi"); -const logger = require('legacy-processor-module/common/logger') -const Schema = require('legacy-processor-module/Schema') -const LegacySubmissionIdService = require('legacy-processor-module/LegacySubmissionIdService') +const logger = require("legacy-processor-module/common/logger"); +const Schema = require("legacy-processor-module/Schema"); +const LegacySubmissionIdService = require("legacy-processor-module/LegacySubmissionIdService"); // The event schema to validate events from Kafka const eventSchema = Schema.createEventSchema({ @@ -16,104 +16,129 @@ const eventSchema = Schema.createEventSchema({ memberId: Joi.id().required(), submissionPhaseId: Joi.id().required(), type: Joi.string().required(), - url: Joi.string().uri().optional(), + url: Joi.string() + .uri() + .optional(), legacySubmissionId: Joi.id().optional() -}) +}); /** * Handle new submission message. - * @param {String} value the message value (JSON string) + * @param {String} event the message value (JSON string) */ -async function handle (value) { - if (!value) { - logger.debug('Skipped null or empty event') - return - } - - // Parse JSON string to get the event - let event - try { - event = JSON.parse(value) - } catch (err) { - logger.debug(`Skipped non well-formed JSON message: ${err.message}`) - return - } - +async function handle(event) { if (!event) { - logger.debug('Skipped null or empty event') - return - } - - // Validate event - if (!Schema.validateEvent(event, eventSchema)) { - return + logger.debug("Skipped null or empty event"); + return; } // Check topic and originator - if (event.topic !== config.KAFKA_NEW_SUBMISSION_TOPIC && event.topic !== config.KAFKA_UPDATE_SUBMISSION_TOPIC) { - logger.debug(`Skipped event from topic ${event.topic}`) - return + if ( + event.topic !== config.KAFKA_NEW_SUBMISSION_TOPIC && + event.topic !== config.KAFKA_UPDATE_SUBMISSION_TOPIC + ) { + logger.debug(`Skipped event from topic ${event.topic}`); + return; } if (event.originator !== config.KAFKA_NEW_SUBMISSION_ORIGINATOR) { - logger.debug(`Skipped event from originator ${event.originator}`) - return + logger.debug(`Skipped event from originator ${event.originator}`); + return; } - if (event.payload.resource !== 'submission') { - logger.debug(`Skipped event from resource ${event.payload.resource}`) - return + if (event.payload.resource !== "submission") { + logger.debug(`Skipped event from resource ${event.payload.resource}`); + return; + } + + // Validate event + if (!Schema.validateEvent(event, eventSchema)) { + return; } // Attempt to retrieve the subTrack of the challenge - const subTrack = await LegacySubmissionIdService.getSubTrack(event.payload.challengeId) - logger.debug(`Challenge ${event.payload.challengeId} get subTrack ${subTrack}`) + const subTrack = await LegacySubmissionIdService.getSubTrack( + event.payload.challengeId + ); + logger.debug( + `Challenge ${event.payload.challengeId} get subTrack ${subTrack}` + ); - const mmChallangeSubtracks = config.MM_CHALLENGE_SUBTRACK.split(',').map(x => x.trim()) + const mmChallangeSubtracks = config.MM_CHALLENGE_SUBTRACK.split(",").map(x => + x.trim() + ); // Skip MM challenge submissions if (!subTrack || mmChallangeSubtracks.includes(subTrack)) { - logger.debug(`Skipped event for subTrack: ${subTrack}`) - return + logger.debug(`Skipped event for subTrack: ${subTrack}`); + return; } if (event.topic === config.KAFKA_NEW_SUBMISSION_TOPIC) { // Handle new submission - const patchObject = await LegacySubmissionIdService.addSubmission( - event.payload.id, - event.payload.challengeId, - event.payload.memberId, - event.payload.submissionPhaseId, - event.payload.url, - event.payload.type - ) - - logger.debug(`Patched to the Submission API: id ${event.payload.id}, patch: ${JSON.stringify(patchObject)}`) + logger.debug(`Started adding submission for ${event.payload.id}`); + try { + const patchObject = await LegacySubmissionIdService.addSubmission( + event.payload.id, + event.payload.challengeId, + event.payload.memberId, + event.payload.submissionPhaseId, + event.payload.url, + event.payload.type + ); + } catch (error) { + logger.error(error); + } + + logger.debug( + `Patched to the Submission API: id ${ + event.payload.id + }, patch: ${JSON.stringify(patchObject)}` + ); } else if (event.payload.url) { // We only concerns updating url, // while the update event may not be caused by url update - let legacySubmissionId = event.payload.legacySubmissionId + let legacySubmissionId = event.payload.legacySubmissionId; if (!legacySubmissionId) { // In case legacySubmissionId not present, try to get it from submission API - const submission = await LegacySubmissionIdService.getSubmission(event.payload.id) - legacySubmissionId = submission.legacySubmissionId || 0 + const submission = await LegacySubmissionIdService.getSubmission( + event.payload.id + ); + legacySubmissionId = submission.legacySubmissionId || 0; } - await LegacySubmissionIdService.updateUpload( - event.payload.challengeId, - event.payload.memberId, - event.payload.submissionPhaseId, - event.payload.url, - event.payload.type, - legacySubmissionId - ) - logger.debug(`Submission url updated, legacy submission id : ${legacySubmissionId} with url ${event.payload.url}`) + logger.debug( + `Started updating URL for submission for ${legacySubmissionId}` + ); + try { + await LegacySubmissionIdService.updateUpload( + event.payload.challengeId, + event.payload.memberId, + event.payload.submissionPhaseId, + event.payload.url, + event.payload.type, + legacySubmissionId + ); + } catch (error) { + logger.error(error); + } + logger.debug( + `Submission url updated, legacy submission id : ${legacySubmissionId} with url ${ + event.payload.url + }` + ); } - logger.debug(`Successful Processing of non MM challenge submission message: ${JSON.stringify(event, null, 2)}`) + logger.debug( + `Successful Processing of non MM challenge submission message: ${JSON.stringify( + event, + null, + 2 + )}` + ); } module.exports = { handle -} +}; From b90af5fb61ae037885257827b537695109b16c89 Mon Sep 17 00:00:00 2001 From: Dushyant Bhalgami Date: Tue, 14 May 2019 15:26:57 +0530 Subject: [PATCH 4/5] patch for --- src/services/SubmissionService.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/services/SubmissionService.js b/src/services/SubmissionService.js index f2b62a8..19288be 100755 --- a/src/services/SubmissionService.js +++ b/src/services/SubmissionService.js @@ -86,15 +86,15 @@ async function handle(event) { event.payload.url, event.payload.type ); + + logger.debug( + `Patched to the Submission API: id ${ + event.payload.id + }, patch: ${JSON.stringify(patchObject)}` + ); } catch (error) { logger.error(error); } - - logger.debug( - `Patched to the Submission API: id ${ - event.payload.id - }, patch: ${JSON.stringify(patchObject)}` - ); } else if (event.payload.url) { // We only concerns updating url, // while the update event may not be caused by url update From 57a4ec45e51300966e5928dce4d030b9693f048f Mon Sep 17 00:00:00 2001 From: liuliquan Date: Thu, 16 May 2019 12:26:20 +0800 Subject: [PATCH 5/5] Fix lint and tests --- .eslintignore | 1 + .eslintrc | 14 + Validation.md | 9 +- config/default.js | 4 +- package-lock.json | 1322 ++++++++--------------------- package.json | 6 +- src/services/SubmissionService.js | 26 +- test/tests.js | 301 +++---- 8 files changed, 520 insertions(+), 1163 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..ed9f9cc --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +coverage \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..17e91e9 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,14 @@ +{ + "parserOptions": { + "ecmaVersion": 2018 + }, + "env": { + "mocha": true, + "node": true, + "es6": true + }, + "extends": "eslint:recommended", + "rules": { + "no-trailing-spaces": "error" + } +} \ No newline at end of file diff --git a/Validation.md b/Validation.md index d1ce26c..b6ff91b 100755 --- a/Validation.md +++ b/Validation.md @@ -82,15 +82,16 @@ docker-compose up lsp-app - Run `docker exec -ti lsp-app bash -c "npm run produce-test-event different-topic"` and verify that the app doesn't consume this message (no log) - Run `docker exec -ti lsp-app bash -c "npm run produce-test-event null-message"` and verify that the app skips this message (log: `Skipped null or empty event`) - Run `docker exec -ti lsp-app bash -c "npm run produce-test-event empty-message"` and verify that the app skips this message (log: `Skipped null or empty event`) -- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event invalid-json"` and verify that the app skips this message (log: `Skipped non well-formed JSON message: ...`) -- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event empty-json"` and verify that the app skips this message (log: `Skipped invalid event, reasons: "topic" is required ...`) +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event invalid-json"` and verify that the app skips this message (log: `Skipped Invalid message JSON`) +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event empty-json"` and verify that the app skips this message (log: `Skipped the message topic "undefined" doesn't match the Kafka topic submission.notification.create`) - Run `docker exec -ti lsp-app bash -c "npm run produce-test-event invalid-payload"` and verify that the app skips this message (log: `Skipped invalid event, reasons: "timestamp" must be...`) -- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event wrong-topic"` and verify that the app skips this message (log: `Skipped event from topic wrong-topic`) +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event wrong-topic"` and verify that the app skips this message (log: `Skipped the message topic "wrong-topic" doesn't match the Kafka topic submission.notification.create`) - Run `docker exec -ti lsp-app bash -c "npm run produce-test-event wrong-originator"` and verify that the app skips this message (log: `Skipped event from topic wrong-originator`) -- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event submission"` and verify that the app makes call to the Submission API successfully (log: `Patched to the Submission API: id 111, patch: {"legacySubmissionId":60000}`) and the Mock API log (`docker logs mock-api`) like `Patch /submissions/111 with {"legacySubmissionId":60000}`. +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event submission"` and verify that the app makes call to the Submission API successfully (log: `Successfully processed non MM message - Patched to the Submission API: id 111, patch: {"legacySubmissionId":60000}`) and the Mock API log (`docker logs mock-api`) like `Patch /submissions/111 with {"legacySubmissionId":60000}`. - Run `docker exec -ti lsp-app bash -c "npm run produce-test-event final-fix"` and verify that the app has log like `final fix upload, only insert upload`, and it should only insert into `upload` table, but not `submission`/`resource_submission` table. - Run `docker exec -ti lsp-app bash -c "npm run produce-test-event not-allow-multiple"` and verify that the app has log like `delete previous submission for challengeId...`. +- Run `docker exec -ti lsp-app bash -c "npm run produce-test-event update-url"` and verify that the app has log like `Successfully processed non MM message - Submission url updated...`. - Run `docker exec -ti lsp-app bash -c "npm run produce-test-event no-challenge-props"` and verify that the app has error log like `Error: null or empty result get challenge properties...`. - Run `docker exec -ti lsp-app bash -c "npm run produce-test-event mm-submission"` and verify that the app skips this message (log: `Skipped event for subTrack: DEVELOP_MARATHON_MATCH`). diff --git a/config/default.js b/config/default.js index da151db..664841c 100755 --- a/config/default.js +++ b/config/default.js @@ -50,9 +50,9 @@ module.exports = { // The Informix Submission Table Sequence Name ID_SEQ_SUBMISSION: process.env.ID_SEQ_SUBMISSION || 'submission_id_seq', - AUTH0_URL: process.env.AUTH0_URL, // Auth0 credentials for Submission Service + AUTH0_URL: process.env.AUTH0_URL || 'https://topcoder-dev.auth0.com/oauth/token', // Auth0 credentials for Submission Service - AUTH0_AUDIENCE: process.env.AUTH0_AUDIENCE, + AUTH0_AUDIENCE: process.env.AUTH0_AUDIENCE || 'https://m2m.topcoder-dev.com/', TOKEN_CACHE_TIME: process.env.TOKEN_CACHE_TIME || '86400000', diff --git a/package-lock.json b/package-lock.json index 1241dcc..5a655af 100755 --- a/package-lock.json +++ b/package-lock.json @@ -215,29 +215,6 @@ "negotiator": "0.6.1" } }, - "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", - "dev": true - }, - "acorn-jsx": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz", - "integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=", - "dev": true, - "requires": { - "acorn": "3.3.0" - }, - "dependencies": { - "acorn": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz", - "integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=", - "dev": true - } - } - }, "ajv": { "version": "6.6.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", @@ -249,24 +226,6 @@ "uri-js": "4.2.2" } }, - "ajv-keywords": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", - "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", - "dev": true - }, - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -290,16 +249,6 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, - "array-includes": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", - "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", - "dev": true, - "requires": { - "define-properties": "1.1.3", - "es-abstract": "1.12.0" - } - }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -313,6 +262,12 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "async": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", @@ -369,53 +324,6 @@ "is-buffer": "1.1.6" } }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "esutils": "2.0.2", - "js-tokens": "3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "2.2.1", - "escape-string-regexp": "1.0.5", - "has-ansi": "2.0.0", - "strip-ansi": "3.0.1", - "supports-color": "2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, "babel-runtime": { "version": "6.6.1", "resolved": "http://registry.npmjs.org/babel-runtime/-/babel-runtime-6.6.1.tgz", @@ -527,12 +435,6 @@ "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -554,21 +456,6 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", - "dev": true, - "requires": { - "callsites": "0.2.0" - } - }, - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", - "dev": true - }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -585,18 +472,6 @@ "supports-color": "5.4.0" } }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true - }, "cli-cursor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", @@ -612,12 +487,6 @@ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true - }, "codependency": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/codependency/-/codependency-0.1.4.tgz", @@ -677,18 +546,6 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "1.1.1", - "inherits": "2.0.3", - "readable-stream": "2.3.6", - "typedarray": "0.0.6" - } - }, "config": { "version": "1.31.0", "resolved": "https://registry.npmjs.org/config/-/config-1.31.0.tgz", @@ -702,12 +559,6 @@ "resolved": "https://registry.npmjs.org/connection-parse/-/connection-parse-0.0.7.tgz", "integrity": "sha1-GOcxiqsGppkmc3KxDFIm0locmmk=" }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true - }, "content-disposition": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", @@ -743,17 +594,6 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "4.0.2", - "shebang-command": "1.2.0", - "which": "1.3.1" - } - }, "crypto-js": { "version": "3.1.9-1", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-3.1.9-1.tgz", @@ -879,57 +719,12 @@ "ms": "2.0.0" } }, - "debug-log": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", - "integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=", - "dev": true - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "1.0.12" - } - }, - "deglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.1.tgz", - "integrity": "sha512-2kjwuGGonL7gWE1XU4Fv79+vVzpoQCl0V+boMwWtOQJV2AGDabCwez++nB1Nli/8BabAfZQ/UuHPlp6AymKdWw==", - "dev": true, - "requires": { - "find-root": "1.1.0", - "glob": "7.1.3", - "ignore": "3.3.10", - "pkg-config": "1.1.1", - "run-parallel": "1.1.9", - "uniq": "1.0.1" - }, - "dependencies": { - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - } - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -951,15 +746,6 @@ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, - "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", - "dev": true, - "requires": { - "esutils": "2.0.2" - } - }, "dotenv": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.1.0.tgz", @@ -996,6 +782,12 @@ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -1009,30 +801,6 @@ "is-arrayish": "0.2.1" } }, - "es-abstract": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz", - "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==", - "dev": true, - "requires": { - "es-to-primitive": "1.2.0", - "function-bind": "1.1.1", - "has": "1.0.3", - "is-callable": "1.1.4", - "is-regex": "1.0.4" - } - }, - "es-to-primitive": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", - "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", - "dev": true, - "requires": { - "is-callable": "1.1.4", - "is-date-object": "1.0.1", - "is-symbol": "1.0.2" - } - }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", @@ -1045,32 +813,32 @@ "dev": true }, "eslint": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.18.2.tgz", - "integrity": "sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw==", + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", "dev": true, "requires": { - "ajv": "5.5.2", - "babel-code-frame": "6.26.0", + "@babel/code-frame": "7.0.0", + "ajv": "6.10.0", "chalk": "2.4.1", - "concat-stream": "1.6.2", - "cross-spawn": "5.1.0", - "debug": "3.1.0", - "doctrine": "2.1.0", - "eslint-scope": "3.7.3", + "cross-spawn": "6.0.5", + "debug": "4.1.1", + "doctrine": "3.0.0", + "eslint-scope": "4.0.3", + "eslint-utils": "1.3.1", "eslint-visitor-keys": "1.0.0", - "espree": "3.5.4", + "espree": "5.0.1", "esquery": "1.0.1", "esutils": "2.0.2", - "file-entry-cache": "2.0.0", + "file-entry-cache": "5.0.1", "functional-red-black-tree": "1.0.1", - "glob": "7.1.3", + "glob": "7.1.4", "globals": "11.9.0", - "ignore": "3.3.10", + "ignore": "4.0.6", + "import-fresh": "3.0.0", "imurmurhash": "0.1.4", - "inquirer": "3.3.0", - "is-resolvable": "1.1.0", - "js-yaml": "3.12.0", + "inquirer": "6.3.1", + "js-yaml": "3.13.1", "json-stable-stringify-without-jsonify": "1.0.1", "levn": "0.3.0", "lodash": "4.17.11", @@ -1079,38 +847,164 @@ "natural-compare": "1.4.0", "optionator": "0.8.2", "path-is-inside": "1.0.2", - "pluralize": "7.0.0", "progress": "2.0.2", - "require-uncached": "1.0.3", - "semver": "5.6.0", + "regexpp": "2.0.1", + "semver": "5.7.0", "strip-ansi": "4.0.0", "strip-json-comments": "2.0.1", - "table": "4.0.2", + "table": "5.3.3", "text-table": "0.2.0" }, "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "7.0.0" + } + }, + "@babel/highlight": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", + "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", + "dev": true, + "requires": { + "chalk": "2.4.1", + "esutils": "2.0.2", + "js-tokens": "4.0.0" + } + }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", "dev": true, "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", + "fast-deep-equal": "2.0.1", "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" + "json-schema-traverse": "0.4.1", + "uri-js": "4.2.2" } }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "1.0.5", + "path-key": "2.0.1", + "semver": "5.7.0", + "shebang-command": "1.2.0", + "which": "1.3.1" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "2.1.1" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "2.0.2" + } + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "6.1.1", + "acorn-jsx": "5.0.1", + "eslint-visitor-keys": "1.0.0" + } + }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "0.7.0", + "iconv-lite": "0.4.24", + "tmp": "0.0.33" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "dev": true, "requires": { "fs.realpath": "1.0.0", @@ -1121,183 +1015,169 @@ "path-is-absolute": "1.0.1" } }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": "2.1.2" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "ansi-escapes": "3.2.0", + "chalk": "2.4.2", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "3.0.3", + "figures": "2.0.0", + "lodash": "4.17.11", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rxjs": "6.5.2", + "string-width": "2.1.1", + "strip-ansi": "5.2.0", + "through": "2.3.8" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "4.1.0" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true - } - } - }, - "eslint-config-standard": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-11.0.0.tgz", - "integrity": "sha512-oDdENzpViEe5fwuRCWla7AXQd++/oyIp8zP+iP9jiUPG6NBj3SHgdgtl/kTn00AjeN+1HNvavTKmYbMo+xMOlw==", - "dev": true - }, - "eslint-config-standard-jsx": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-5.0.0.tgz", - "integrity": "sha512-rLToPAEqLMPBfWnYTu6xRhm2OWziS2n40QFqJ8jAM8NSVzeVKTa3nclhsU4DpPJQRY60F34Oo1wi/71PN/eITg==", - "dev": true - }, - "eslint-import-resolver-node": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", - "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", - "dev": true, - "requires": { - "debug": "2.6.9", - "resolve": "1.8.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { - "ms": "2.0.0" + "argparse": "1.0.10", + "esprima": "4.0.1" } - } - } - }, - "eslint-module-utils": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz", - "integrity": "sha1-snA2LNiLGkitMIl2zn+lTphBF0Y=", - "dev": true, - "requires": { - "debug": "2.6.9", - "pkg-dir": "1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "ms": "2.0.0" + "glob": "7.1.4" } - } - } - }, - "eslint-plugin-import": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.9.0.tgz", - "integrity": "sha1-JgAu+/ylmJtyiKwEdQi9JPIXsWk=", - "dev": true, - "requires": { - "builtin-modules": "1.1.1", - "contains-path": "0.1.0", - "debug": "2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "0.3.2", - "eslint-module-utils": "2.2.0", - "has": "1.0.3", - "lodash": "4.17.11", - "minimatch": "3.0.4", - "read-pkg-up": "2.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + }, + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ansi-styles": "3.2.1", + "astral-regex": "1.0.0", + "is-fullwidth-code-point": "2.0.0" } }, - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "table": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/table/-/table-5.3.3.tgz", + "integrity": "sha512-3wUNCgdWX6PNpOe3amTTPWPuF6VGvgzjKCaO1snFj0z7Y3mUPWf5+zDtxUVGispJkDECPmR29wbzh6bVMOHbcw==", "dev": true, "requires": { - "esutils": "2.0.2", - "isarray": "1.0.0" + "ajv": "6.10.0", + "lodash": "4.17.11", + "slice-ansi": "2.1.0", + "string-width": "3.1.0" + }, + "dependencies": { + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "7.0.3", + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "5.2.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "4.1.0" + } + } + } + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "0.5.1" } } } }, - "eslint-plugin-node": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", - "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", - "dev": true, - "requires": { - "ignore": "3.3.10", - "minimatch": "3.0.4", - "resolve": "1.8.1", - "semver": "5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", - "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", - "dev": true - } - } - }, - "eslint-plugin-promise": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.7.0.tgz", - "integrity": "sha512-2WO+ZFh7vxUKRfR0cOIMrWgYKdR6S1AlOezw6pC52B6oYpd5WFghN+QHxvrRdZMtbo8h3dfUZ2o1rWb0UPbKtg==", - "dev": true - }, - "eslint-plugin-react": { - "version": "7.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz", - "integrity": "sha512-KC7Snr4YsWZD5flu6A5c0AcIZidzW3Exbqp7OT67OaD2AppJtlBr/GuPrW/vaQM/yfZotEvKAdrxrO+v8vwYJA==", - "dev": true, - "requires": { - "doctrine": "2.1.0", - "has": "1.0.3", - "jsx-ast-utils": "2.0.1", - "prop-types": "15.6.2" - } - }, - "eslint-plugin-standard": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz", - "integrity": "sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI=", + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", "dev": true }, - "eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-W+B0SvF4gamyCTmUc+uITPY0989iXVfKvhwtmJocTaYoc/3khEHmEmvfY/Gn9HA9VV75jrQECsHizkNw1b68FA==", - "dev": true, - "requires": { - "esrecurse": "4.2.1", - "estraverse": "4.2.0" - } - }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, - "espree": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", - "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", - "dev": true, - "requires": { - "acorn": "5.7.3", - "acorn-jsx": "3.0.1" - } - }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -1401,17 +1281,6 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "0.4.2", - "iconv-lite": "0.4.23", - "tmp": "0.0.33" - } - }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -1447,16 +1316,6 @@ "escape-string-regexp": "1.0.5" } }, - "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", - "dev": true, - "requires": { - "flat-cache": "1.3.4", - "object-assign": "4.1.1" - } - }, "finalhandler": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", @@ -1481,59 +1340,6 @@ } } }, - "find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "dev": true, - "requires": { - "path-exists": "2.1.0", - "pinkie-promise": "2.0.1" - } - }, - "flat-cache": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", - "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", - "dev": true, - "requires": { - "circular-json": "0.3.3", - "graceful-fs": "4.1.15", - "rimraf": "2.6.2", - "write": "0.2.1" - }, - "dependencies": { - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "1.0.0", - "inflight": "1.0.6", - "inherits": "2.0.3", - "minimatch": "3.0.4", - "once": "1.4.0", - "path-is-absolute": "1.0.1" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "7.1.3" - } - } - } - }, "flatted": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", @@ -1583,22 +1389,10 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", - "dev": true - }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, "getpass": { @@ -1653,36 +1447,12 @@ "har-schema": "2.0.0" } }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "2.1.1" - } - }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, - "has-symbols": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", - "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", - "dev": true - }, "hashring": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/hashring/-/hashring-3.2.0.tgz", @@ -1766,11 +1536,38 @@ "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "1.0.1", + "resolve-from": "4.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "3.1.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + } + } }, "imurmurhash": { "version": "0.1.4", @@ -1801,28 +1598,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "dev": true, - "requires": { - "ansi-escapes": "3.1.0", - "chalk": "2.4.1", - "cli-cursor": "2.1.0", - "cli-width": "2.2.0", - "external-editor": "2.2.0", - "figures": "2.0.0", - "lodash": "4.17.11", - "mute-stream": "0.0.7", - "run-async": "2.3.0", - "rx-lite": "4.0.8", - "rx-lite-aggregates": "4.0.8", - "string-width": "2.1.1", - "strip-ansi": "4.0.0", - "through": "2.3.8" - } - }, "int64-buffer": { "version": "0.1.10", "resolved": "https://registry.npmjs.org/int64-buffer/-/int64-buffer-0.1.10.tgz", @@ -1860,18 +1635,6 @@ "builtin-modules": "1.1.1" } }, - "is-callable": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", - "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==", - "dev": true - }, - "is-date-object": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -1884,30 +1647,6 @@ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, - "is-regex": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", - "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, - "requires": { - "has": "1.0.3" - } - }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, - "is-symbol": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", - "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", - "dev": true, - "requires": { - "has-symbols": "1.0.0" - } - }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -1987,16 +1726,6 @@ "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, - "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", - "dev": true, - "requires": { - "argparse": "1.0.10", - "esprima": "4.0.1" - } - }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -2082,15 +1811,6 @@ "verror": "1.10.0" } }, - "jsx-ast-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", - "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", - "dev": true, - "requires": { - "array-includes": "3.0.3" - } - }, "jwa": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", @@ -2152,7 +1872,7 @@ } }, "legacy-processor-module": { - "version": "git+https://github.com/topcoder-platform/legacy-processor-module.git#54d5b44be6137e7e5bd05f479a721aded7a320b3" + "version": "git+https://github.com/topcoder-platform/legacy-processor-module.git#a2a4fd63f6a6e9c85bf015efb4850afb9cb85a15" }, "levn": { "version": "0.3.0", @@ -2169,18 +1889,6 @@ "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.3.tgz", "integrity": "sha512-zrycnIMsLw/3ZxTbW7HCez56rcFGecWTx5OZNplzcXUUmJLmoYArC6qdJzmAN5BWiNXGcpjhF9RQ1HSv5zebEw==" }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "4.1.15", - "parse-json": "2.2.0", - "pify": "2.3.0", - "strip-bom": "3.0.0" - } - }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", @@ -2487,6 +2195,12 @@ "lodash": "4.17.11" } }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "no-kafka": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/no-kafka/-/no-kafka-3.4.2.tgz", @@ -4573,18 +4287,6 @@ "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-keys": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", - "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==", - "dev": true - }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -4671,29 +4373,11 @@ } } }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "1.3.2" - } - }, "parseurl": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "2.0.1" - } - }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -4705,6 +4389,12 @@ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", @@ -4715,116 +4405,11 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "2.3.0" - } - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "2.0.4" - } - }, - "pkg-conf": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", - "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", - "dev": true, - "requires": { - "find-up": "2.1.0", - "load-json-file": "4.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "4.1.15", - "parse-json": "4.0.0", - "pify": "3.0.0", - "strip-bom": "3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "1.3.2", - "json-parse-better-errors": "1.0.2" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } - }, - "pkg-config": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", - "integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=", - "dev": true, - "requires": { - "debug-log": "1.0.1", - "find-root": "1.1.0", - "xtend": "4.0.1" - } - }, - "pkg-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", - "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", - "dev": true, - "requires": { - "find-up": "1.1.2" - } - }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, "precond": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", @@ -4847,16 +4432,6 @@ "integrity": "sha512-/OLz5F9beZUWwSHZDreXgap1XShX6W+DCHQCqwCF7uZ88s6uTlD2cR3JBE77SegCmNtb1Idst+NfmwcdU6KVhw==", "dev": true }, - "prop-types": { - "version": "15.6.2", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", - "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", - "dev": true, - "requires": { - "loose-envify": "1.4.0", - "object-assign": "4.1.1" - } - }, "protocol-buffers-schema": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.3.2.tgz", @@ -4912,38 +4487,6 @@ "unpipe": "1.0.0" } }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "2.0.0", - "normalize-package-data": "2.4.0", - "path-type": "2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "2.1.0", - "read-pkg": "2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "2.0.0" - } - } - } - }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -4966,6 +4509,12 @@ "backoff": "2.5.0" } }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -5009,16 +4558,6 @@ "resolve": "1.8.1" } }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "0.1.0", - "resolve-from": "1.0.1" - } - }, "requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", @@ -5032,12 +4571,6 @@ "path-parse": "1.0.6" } }, - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", - "dev": true - }, "restore-cursor": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", @@ -5066,25 +4599,13 @@ "is-promise": "2.1.0" } }, - "run-parallel": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", - "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", - "dev": true - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", "dev": true, "requires": { - "rx-lite": "4.0.8" + "tslib": "1.9.3" } }, "safe-buffer": { @@ -5244,15 +4765,6 @@ "resolved": "https://registry.npmjs.org/simple-lru-cache/-/simple-lru-cache-0.0.2.tgz", "integrity": "sha1-1ZzDoZPBpdAyD4Tucy9uRxPlEd0=" }, - "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "2.0.0" - } - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -5319,35 +4831,6 @@ "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, - "standard": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/standard/-/standard-11.0.1.tgz", - "integrity": "sha512-nu0jAcHiSc8H+gJCXeiziMVZNDYi8MuqrYJKxTgjP4xKXZMKm311boqQIzDrYI/ktosltxt2CbDjYQs9ANC8IA==", - "dev": true, - "requires": { - "eslint": "4.18.2", - "eslint-config-standard": "11.0.0", - "eslint-config-standard-jsx": "5.0.0", - "eslint-plugin-import": "2.9.0", - "eslint-plugin-node": "6.0.1", - "eslint-plugin-promise": "3.7.0", - "eslint-plugin-react": "7.7.0", - "eslint-plugin-standard": "3.0.1", - "standard-engine": "8.0.1" - } - }, - "standard-engine": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-8.0.1.tgz", - "integrity": "sha512-LA531C3+nljom/XRvdW/hGPXwmilRkaRkENhO3FAGF1Vtq/WtCXzgmnc5S6vUHHsgv534MRy02C1ikMwZXC+tw==", - "dev": true, - "requires": { - "deglob": "2.1.1", - "get-stdin": "6.0.0", - "minimist": "1.2.0", - "pkg-conf": "2.1.0" - } - }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", @@ -5430,48 +4913,8 @@ "has-flag": "3.0.0" } }, - "table": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", - "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", - "dev": true, - "requires": { - "ajv": "5.5.2", - "ajv-keywords": "2.1.1", - "chalk": "2.4.1", - "lodash": "4.17.11", - "slice-ansi": "1.0.0", - "string-width": "2.1.1" - }, - "dependencies": { - "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", - "dev": true, - "requires": { - "co": "4.6.0", - "fast-deep-equal": "1.1.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "fast-deep-equal": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", - "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", - "dev": true - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", - "dev": true - } - } - }, "tc-core-library-js": { - "version": "github:appirio-tech/tc-core-library-js#6cb5a71b16966222f4b30e96bbee79c73a5fd71e", + "version": "github:appirio-tech/tc-core-library-js#d16413db30b1eed21c0cf426e185bedb2329ddab", "requires": { "auth0-js": "9.8.2", "axios": "0.12.0", @@ -5583,6 +5026,12 @@ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=", "dev": true }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -5614,18 +5063,6 @@ "mime-types": "2.1.21" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", - "dev": true - }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -5735,15 +5172,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", - "dev": true, - "requires": { - "mkdirp": "0.5.1" - } - }, "wrr-pool": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/wrr-pool/-/wrr-pool-1.1.4.tgz", @@ -5752,12 +5180,6 @@ "lodash": "4.17.11" } }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", diff --git a/package.json b/package.json index d316cc2..9074b0f 100755 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "test:docker": "npm run test", "clean": "rm -rf node_modules && rm -rf coverage && rm -rf .nyc_output", "start": "node index", - "lint": "standard", - "lint:fix": "standard --fix", + "lint": "eslint .", + "lint:fix": "eslint --fix .", "mock-api": "node node_modules/legacy-processor-module/mock/mock-api", "produce-test-event": "node node_modules/legacy-processor-module/test/produce-test-event", "test": "npm run lint && nyc --reporter=html --reporter=text mocha test/tests.js --timeout 20000 --exit" @@ -33,9 +33,9 @@ "winston": "^2.4.2" }, "devDependencies": { + "eslint": "^5.16.0", "mocha": "^5.2.0", "nyc": "^12.0.2", - "standard": "^11.0.1", "should": "^13.2.3" }, "standard": { diff --git a/src/services/SubmissionService.js b/src/services/SubmissionService.js index 19288be..80c2bb9 100755 --- a/src/services/SubmissionService.js +++ b/src/services/SubmissionService.js @@ -23,8 +23,8 @@ const eventSchema = Schema.createEventSchema({ }); /** - * Handle new submission message. - * @param {String} event the message value (JSON string) + * Handle new submission and update submission event. + * @param {Object} event the event object */ async function handle(event) { if (!event) { @@ -88,11 +88,12 @@ async function handle(event) { ); logger.debug( - `Patched to the Submission API: id ${ + `Successfully processed non MM message - Patched to the Submission API: id ${ event.payload.id }, patch: ${JSON.stringify(patchObject)}` ); } catch (error) { + logger.error(`Failed to handle ${JSON.stringify(event)}: ${error.message}`) logger.error(error); } } else if (event.payload.url) { @@ -120,23 +121,16 @@ async function handle(event) { event.payload.type, legacySubmissionId ); + logger.debug( + `Successfully processed non MM message - Submission url updated, legacy submission id : ${legacySubmissionId} with url ${ + event.payload.url + }` + ); } catch (error) { + logger.error(`Failed to handle ${JSON.stringify(event)}: ${error.message}`) logger.error(error); } - logger.debug( - `Submission url updated, legacy submission id : ${legacySubmissionId} with url ${ - event.payload.url - }` - ); } - - logger.debug( - `Successful Processing of non MM challenge submission message: ${JSON.stringify( - event, - null, - 2 - )}` - ); } module.exports = { diff --git a/test/tests.js b/test/tests.js index 6fe3da6..5f82582 100755 --- a/test/tests.js +++ b/test/tests.js @@ -82,7 +82,7 @@ describe('Topcoder - Submission Legacy Processor Application', () => { let consumer ['debug', 'info', 'error', 'warn'].forEach((level) => { logger[level] = (message) => { - logMessages.push(message) + logMessages.push(message + '') } }) /** @@ -90,11 +90,12 @@ describe('Topcoder - Submission Legacy Processor Application', () => { */ const waitJob = async () => { // will not loop forever for timeout configuration of mocha + // eslint-disable-next-line no-constant-condition while (true) { // sleep at first to ensure consume message await sleep(timeout) // break if completed handing or failed to handle - if (logMessages.find(x => x.includes('Completed handling') || x.includes('Failed to handle'))) { + if (logMessages.find(x => x.startsWith('Skipped') || x.startsWith('Successfully processed') || x.startsWith('Failed to handle'))) { break } } @@ -175,55 +176,57 @@ describe('Topcoder - Submission Legacy Processor Application', () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: null } } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped null or empty event') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with null string value', async () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: 'null' } } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped null or empty event') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with empty value', async () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: '' } } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped null or empty event') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with non-well-formed JSON string value', async () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: 'abc' } } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.equal(logMessages[1], 'Skipped non well-formed JSON message: Unexpected token a in JSON at position 0') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) + should.equal(logMessages[1], 'Skipped Invalid message JSON') }) - it('should skip message with empty JSON string', async () => { - const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: '{}' } } + it('should skip message with wrong topic value', async () => { + const m = { + topic: config.KAFKA_NEW_SUBMISSION_TOPIC, + message: { + value: JSON.stringify(_.merge({}, sampleMessage, { + topic: 'wrong-topic' + })) + } + } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.equal(logMessages[1], 'Skipped invalid event, reasons: "topic" is required, "originator" is required, "timestamp" is required, "mime-type" is required, "payload" is required') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) + should.equal(logMessages[1], `Skipped the message topic "wrong-topic" doesn't match the Kafka topic ${config.KAFKA_NEW_SUBMISSION_TOPIC}.`) }) it('should skip message with invalid timestamp and payload value', async () => { @@ -245,29 +248,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "timestamp" must be a number of milliseconds or valid date string, "id" must be a positive number, "id" must be a string, "challengeId" must be a number, "memberId" must be a number, "type" must be a string, "url" must be a valid uri') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) - }) - - it('should skip message with wrong topic value', async () => { - const m = { - topic: config.KAFKA_NEW_SUBMISSION_TOPIC, - message: { - value: JSON.stringify(_.merge({}, sampleMessage, { - topic: 'wrong-topic' - })) - } - } - const results = await producer.send(m) - await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.equal(logMessages[1], 'Skipped event from topic wrong-topic') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with wrong originator value', async () => { @@ -281,11 +265,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped event from originator wrong-originator') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with wrong resource value', async () => { @@ -301,31 +284,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped event from resource review') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) - }) - - it('should skip message with invalid resource value', async () => { - const m = { - topic: config.KAFKA_NEW_SUBMISSION_TOPIC, - message: { - value: JSON.stringify(_.merge({}, sampleMessage, { - payload: { - resource: 'review_test' - } - })) - } - } - const results = await producer.send(m) - await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.equal(logMessages[1], 'Skipped invalid event, reasons: "resource" must be one of [submission], "resource" must be one of [review], "resource" must be one of [reviewSummation]') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with null id value', async () => { @@ -341,11 +303,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "id" must be a number, "id" must be a string') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with zero id value', async () => { @@ -361,11 +322,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "id" must be a positive number, "id" must be a string') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with null challengeId value', async () => { @@ -381,11 +341,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "challengeId" must be a number') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with zero challengeId value', async () => { @@ -401,11 +360,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "challengeId" must be a positive number') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with null memberId value', async () => { @@ -421,11 +379,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "memberId" must be a number') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with zero memberId value', async () => { @@ -441,11 +398,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "memberId" must be a positive number') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with null url value', async () => { @@ -461,11 +417,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "url" must be a string') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with invalid url value', async () => { @@ -481,11 +436,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "url" must be a valid uri') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with null type value', async () => { @@ -501,11 +455,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "type" must be a string') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with empty type value', async () => { @@ -521,11 +474,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "type" is not allowed to be empty') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with null submissionPhaseId value', async () => { @@ -541,11 +493,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "submissionPhaseId" must be a number') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip message with zero submissionPhaseId value', async () => { @@ -561,35 +512,30 @@ describe('Topcoder - Submission Legacy Processor Application', () => { } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.equal(logMessages[1], 'Skipped invalid event, reasons: "submissionPhaseId" must be a positive number') - should.equal(logMessages[2], `Completed handling ${messageInfo}`) }) it('should skip new submission(not found subTrack) message', async () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(_.merge({}, sampleMessage, { payload: { challengeId: 60005521 } })) } } - logMessages = [] let results = await producer.send(m) await waitJob() - let messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(5) - should.equal(logMessages[0], `Received ${messageInfo}`) + let messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.ok(logMessages.find(x => x.startsWith('Skipped event for subTrack: '))) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) }) it('should skip new submission of MM challenge message', async () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(_.merge({}, sampleMessage, { payload: { challengeId: 30054163 } })) } } - logMessages = [] let results = await producer.send(m) await waitJob() - let messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(5) - should.equal(logMessages[0], `Received ${messageInfo}`) + let messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.ok(logMessages.find(x => x.startsWith('Skipped event for subTrack: DEVELOP_MARATHON_MATCH'))) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) }) it('should handle new submission message successfully', async () => { @@ -598,12 +544,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { let m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleMessage) } } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(6) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.ok(logMessages.find(x => x.startsWith(`Patched to the Submission API: id ${sampleMessage.payload.id}`))) - should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith(`Successfully processed non MM message - Patched to the Submission API: id ${sampleMessage.payload.id}`))) await expectTable('upload', 1, { project_id: sampleMessage.payload.challengeId, @@ -624,6 +568,7 @@ describe('Topcoder - Submission Legacy Processor Application', () => { })) } } + logMessages = [] await producer.send(m) await waitJob() @@ -642,13 +587,11 @@ describe('Topcoder - Submission Legacy Processor Application', () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleFinalFixMessage) } } const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(6) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.ok(logMessages.find(x => x.startsWith(`Patched to the Submission API: id ${sampleFinalFixMessage.payload.id}`))) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(3) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith(`Successfully processed non MM message - Patched to the Submission API: id ${sampleFinalFixMessage.payload.id}`))) should.ok(logMessages.find(x => x.includes('{"legacyUploadId":'))) - should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) await expectTable('upload', 1, { project_id: sampleFinalFixMessage.payload.challengeId, @@ -663,15 +606,12 @@ describe('Topcoder - Submission Legacy Processor Application', () => { await clearSubmissions() const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleStudioMessage) } } - logMessages = [] let results = await producer.send(m) await waitJob() - let messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(6) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.ok(logMessages.find(x => x.startsWith(`Patched to the Submission API: id ${sampleStudioMessage.payload.id}`))) - should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + let messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith(`Successfully processed non MM message - Patched to the Submission API: id ${sampleStudioMessage.payload.id}`))) await expectTable('upload', 1, { project_id: sampleStudioMessage.payload.challengeId, @@ -684,15 +624,12 @@ describe('Topcoder - Submission Legacy Processor Application', () => { it('should handle new submission message which not allow multiple submissions successfully', async () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleNotAllowMultipleMessage) } } - logMessages = [] let results = await producer.send(m) await waitJob() - let messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(6) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.ok(logMessages.find(x => x.startsWith(`Patched to the Submission API: id ${sampleNotAllowMultipleMessage.payload.id}`))) - should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + let messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith(`Successfully processed non MM message - Patched to the Submission API: id ${sampleNotAllowMultipleMessage.payload.id}`))) await expectTable('upload', 1, { project_id: sampleNotAllowMultipleMessage.payload.challengeId, @@ -704,10 +641,8 @@ describe('Topcoder - Submission Legacy Processor Application', () => { logMessages = [] results = await producer.send(m) await waitJob() - messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - should.ok(logMessages.find(x => x.startsWith(`Patched to the Submission API: id ${sampleNotAllowMultipleMessage.payload.id}`))) - should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + should.ok(logMessages.find(x => x.startsWith(`Successfully processed non MM message - Patched to the Submission API: id ${sampleNotAllowMultipleMessage.payload.id}`))) await expectTable('upload', 1, { project_id: sampleNotAllowMultipleMessage.payload.challengeId, @@ -718,13 +653,11 @@ describe('Topcoder - Submission Legacy Processor Application', () => { it('should log error for new submission without challenge properties', async () => { const m = { topic: config.KAFKA_NEW_SUBMISSION_TOPIC, message: { value: JSON.stringify(sampleNoChallengePropertiesMessage) } } - logMessages = [] let results = await producer.send(m) await waitJob() - let messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(4) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.ok(logMessages.find(x => x.startsWith(`Failed to handle ${messageInfo}`))) + let messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.ok(logMessages.find(x => x.includes('Error: null or empty result get challenge properties'))) }) @@ -734,14 +667,10 @@ describe('Topcoder - Submission Legacy Processor Application', () => { const results = await producer.send(m) await waitJob() await startServer(mockApi, config.MOCK_API_PORT) - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(3) - should.equal(logMessages[0], `Received ${messageInfo}`) - should.ok(logMessages.find(x => x.startsWith(`Failed to handle ${messageInfo}: connect ECONNREFUSED`) || - x.startsWith(`Failed to handle ${messageInfo}: getaddrinfo ENOTFOUND`) - )) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.ok(logMessages.find(x => x.startsWith('{ Error: connect ECONNREFUSED') || x.startsWith('{ Error: getaddrinfo ENOTFOUND'))) - should.ok(logMessages.find(x => x.startsWith(`Failed to handle ${messageInfo}`))) }) it('should handle update submission message successfully', async () => { @@ -774,13 +703,11 @@ describe('Topcoder - Submission Legacy Processor Application', () => { logMessages = [] const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(4) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(3) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.ok(logMessages.find(x => x.startsWith('no valid submission id'))) - should.ok(logMessages.find(x => x.startsWith('Submission url updated, legacy submission id : 0'))) - should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith('Successfully processed non MM message - Submission url updated, legacy submission id : 0'))) await expectTable('upload', 1, { project_id: sampleMessage.payload.challengeId, @@ -817,13 +744,11 @@ describe('Topcoder - Submission Legacy Processor Application', () => { logMessages = [] const results = await producer.send(m) await waitJob() - const messageInfo = `message from topic ${results[0].topic}, partition ${results[0].partition}, offset ${results[0].offset}: ${m.message.value}` - logMessages.length.should.be.greaterThanOrEqual(4) - should.equal(logMessages[0], `Received ${messageInfo}`) + const messageInfo = `Topic: ${results[0].topic}; Partition: ${results[0].partition}; Offset: ${results[0].offset}; Message: ${m.message.value}.` + logMessages.length.should.be.greaterThanOrEqual(2) + should.equal(logMessages[0], `Handle Kafka event message; ${messageInfo}`) should.not.exist(logMessages.find(x => x.startsWith('no valid submission id'))) - should.ok(logMessages.find(x => x.startsWith('Submission url updated, legacy submission id'))) - should.ok(logMessages.find(x => x.startsWith('Successful Processing of non MM challenge submission message'))) - should.equal(logMessages[logMessages.length - 1], `Completed handling ${messageInfo}`) + should.ok(logMessages.find(x => x.startsWith('Successfully processed non MM message - Submission url updated, legacy submission id'))) await expectTable('upload', 1, { project_id: sampleMessage.payload.challengeId,