Skip to content

Production Release for Project Plan #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 73 commits into from
Jun 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
be01938
Merge from phases and products challenge
coderReview May 24, 2018
fb0fc89
merge from phases and products elasticsearch challenge
coderReview May 24, 2018
43859dd
Merge branch 'dev' into dev-challenges
coderReview May 24, 2018
1e65c93
merge from project and product templates
coderReview May 26, 2018
e9d5ef2
Merge branch 'dev-challenges' into dev-challenge-templates
coderReview May 26, 2018
086ad13
Merge pull request #2 from coderReview/dev-challenge-templates
coderReview May 26, 2018
46e6678
Merge pull request #84 from coderReview/dev-challenges
coderReview May 26, 2018
8e84aed
Deploy feature branch to dev env
May 28, 2018
5136321
Trying fix for aliases schema change
May 28, 2018
e6d3543
added aliases to the project template
May 29, 2018
24f381d
Fixed required validations in update methods
May 29, 2018
57d7137
fixed unit tests for recent changes
May 29, 2018
180b3bf
adding version and templateId fields to project model
May 29, 2018
7a3d0c7
Optional phase startDate and endDate
May 29, 2018
7e596d4
Removed tests cases for required start and end dates for a phase
May 29, 2018
9cb3bc3
startDate endDate validation fix for null case
May 29, 2018
d1c284d
#87 - Added /projectTypes endpoints
ngoctay May 31, 2018
c2d1e76
Added filtering on productKey for product templates
May 31, 2018
7c10f7e
#86 - code, unit tests, updated Postman and Swagger
ngoctay May 31, 2018
5a8ab3c
Additiona fix for #86 #87 according to reviewer comments
ngoctay Jun 4, 2018
baefcd0
Added logic for creating/deleting a topic for a phase created/deleted…
Jun 4, 2018
4203102
#86 #87 - wrap a single method which creates phases and products
ngoctay Jun 4, 2018
2fc571c
Wrap creating project, phases, and products in a single method
ngoctay Jun 6, 2018
47c3667
Merge pull request #88 from ngoctay/feature/dev-challenges
Jun 6, 2018
b78f9c3
Project migration challenge
coderReview May 31, 2018
1d0a54a
Revert some changes from migration challenge
coderReview Jun 6, 2018
b159a9b
Revert some changes from migration challenge - create.spec.js
coderReview Jun 6, 2018
21582b2
Fix tests issues
coderReview Jun 6, 2018
9c02135
fixed bug which was causing null values in project id
Jun 6, 2018
aca030c
Creating default topic for phase when phase is created via new project
Jun 6, 2018
da3da62
lint fixes
Jun 6, 2018
aa39c27
- Merge the code with "topcoder Connect - Timeline and Milestone REST…
ngoctay Jun 6, 2018
da0e243
Removed secrets in default.json
ngoctay Jun 6, 2018
157bb75
Added more tests for updating milestone order
ngoctay Jun 8, 2018
dcaef1c
Merge pull request #90 from ngoctay/feature/dev-challenges
coderReview Jun 8, 2018
13d9052
Added migration sql script: create project.templateId and new tables
ngoctay Jun 8, 2018
56cafd1
Merge migration scripts
ngoctay Jun 10, 2018
10cf0e1
Merge pull request #91 from ngoctay/feature/dev-challenges
coderReview Jun 10, 2018
e73a906
Fixing topic creation for each phase of a new project
Jun 11, 2018
23d58f4
fixing lint
Jun 11, 2018
be2f54c
returning promise in phase create route
Jun 11, 2018
3a1729f
lint fix
Jun 11, 2018
8c2997d
logging for more details
Jun 11, 2018
5d045a8
added db sync call before running unit tests
Jun 11, 2018
3a9533a
Skipped milestone and timeline tests
Jun 11, 2018
b408222
Running only projects unit tests
Jun 11, 2018
a2a07f3
Fix circleci test failed
ngoctay Jun 11, 2018
bbdb5e8
Added mocha timeout
ngoctay Jun 12, 2018
0bf63e1
Merge branch 'feature/dev-challenges' into feature/dev-challenges
coderReview Jun 12, 2018
3906ccd
Merge pull request #93 from ngoctay/feature/dev-challenges
coderReview Jun 12, 2018
22c760c
Fixing issue with topic creation for a phase
Jun 12, 2018
94f80a1
Revert "Skipped milestone and timeline tests"
Jun 12, 2018
a9cf468
Revert "Timeline and Milestone REST API + Misc Fixes"
coderReview Jun 12, 2018
ea42b87
Merge pull request #94 from topcoder-platform/revert-90-feature/dev-c…
Jun 12, 2018
8164211
using system user token to create topics for phase
Jun 13, 2018
28ebc6e
Allowed direct project and billing account ids in update product calls
Jun 13, 2018
2ec838a
lint fix
Jun 13, 2018
d489ee2
marking duration as optional field
Jun 13, 2018
e8c5836
setting duration from phase template
Jun 13, 2018
009b747
Allowing only copilots and above role users to add/update/delete phas…
Jun 13, 2018
b7d0535
added new fields to the schema migration file
Jun 13, 2018
7368322
added unit tests for phase and products for validating the add/update…
Jun 13, 2018
e957be5
dependency update
Jun 13, 2018
c1e6c92
making project compatible with current connect app so that the servic…
Jun 18, 2018
d0cdd1e
Added disabled and hidden fields to the project and product templates…
Jun 18, 2018
8d4c36c
fixed issue with backward compatibility code
Jun 18, 2018
9edbfa6
updated sql for disabled and hidden fields in templates
Jun 18, 2018
af3922b
Updating version of the project to v2 when template id is not supplied
Jun 18, 2018
f05fbde
Merge pull request #96 from topcoder-platform/hotfix/reverting_refcod…
Jun 18, 2018
4de8417
Allowed zero in budget, spentBudget, progress and duration
Jun 19, 2018
0b499c9
Merge branch 'dev' into feature/dev-challenges
Jun 20, 2018
122fe66
Merge branch 'master' into dev
Jun 25, 2018
4d1bc17
Merge pull request #99 from topcoder-platform/feature/dev-challenges
Jun 25, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ workflows:
- test
filters:
branches:
only: 'dev'
only: ['dev', 'feature/dev-challenges']
- deployProd:
requires:
- test
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Run image:
`docker run -p 3000:3000 -i -t -e DB_HOST=172.17.0.1 tc_projects_services`
You may replace 172.17.0.1 with your docker0 IP.

You can paste **swagger.yaml** to [swagger editor](http://editor.swagger.io/) or import **postman.json** to verify endpoints.
You can paste **swagger.yaml** to [swagger editor](http://editor.swagger.io/) or import **postman.json** and **postman_environment.json** to verify endpoints.

#### Deploying without docker
If you don't want to use docker to deploy to localhost. You can simply run `npm run start` from root of project. This should start the server on default port `3000`.
1 change: 1 addition & 0 deletions config/custom-environment-variables.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"VALID_ISSUERS": "VALID_ISSUERS",
"jwksUri": "JWKS_URI",
"busApiUrl": "BUS_API_URL",
"messageApiUrl": "MESSAGE_SERVICE_URL",
"AUTH0_URL" : "AUTH0_URL",
"AUTH0_CLIENT_ID": "AUTH0_CLIENT_ID",
"AUTH0_CLIENT_SECRET": "AUTH0_CLIENT_SECRET",
Expand Down
7 changes: 6 additions & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@
},
"analyticsKey": "",
"VALID_ISSUERS": "[\"https:\/\/topcoder-newauth.auth0.com\/\",\"https:\/\/api.topcoder-dev.com\"]",
"busApiUrl": "http://api.topcoder-dev.com",
"validIssuers": "[\"https:\/\/topcoder-newauth.auth0.com\/\",\"https:\/\/api.topcoder-dev.com\"]",
"jwksUri": "",
"busApiUrl": "http://api.topcoder-dev.com/v5",
"messageApiUrl": "http://api.topcoder-dev.com/v5",
"busApiToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoicHJvamVjdC1zZXJ2aWNlIiwiaWF0IjoxNTEyNzQ3MDgyLCJleHAiOjE1MjEzODcwODJ9.PHuNcFDaotGAL8RhQXQMdpL8yOKXxjB5DbBIodmt7RE",
"HEALTH_CHECK_URL": "_health",
"maxPhaseProductCount": 1,
"AUTH0_CLIENT_ID": "",
"AUTH0_CLIENT_SECRET": "",
"AUTH0_AUDIENCE": "",
Expand Down
2 changes: 1 addition & 1 deletion local/mock-services/authMiddleware.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = function def(req, res, next) {
if (req.method === 'POST' && req.url === '/authorizations/') {
if (req.method === 'POST' && (req.url === '/authorizations/' || req.url === '/authorizations')) {
const resp = {
id: '1',
result: {
Expand Down
5 changes: 3 additions & 2 deletions local/mock-services/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ server.use(authMiddleware);
// add additional search route for project members
server.get('/v3/members/_search', (req, res) => {
const fields = _.isString(req.query.fields) ? req.query.fields.split(',') : [];
const filter = _.isString(req.query.query) ? req.query.query.split(' OR ') : [];
const filter = _.isString(req.query.query) ?
req.query.query.replace('%2520', ' ').replace('%20', ' ').split(' OR ') : [];
const criteria = _.map(filter, (single) => {
const ret = { };
const ret = {};
const splitted = single.split(':');
// if the result can be parsed successfully
const parsed = jsprim.parseInteger(splitted[1], { allowTrailing: true, trimWhitespace: true });
Expand Down
150 changes: 150 additions & 0 deletions local/mock-services/services.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,156 @@
}
},
"version": "v3"
},
{
"id": "test_customer1",
"result": {
"success": true,
"status": 200,
"metadata": null,
"content": {
"maxRating": {
"rating": 1114,
"track": "DATA_SCIENCE",
"subTrack": "SRM"
},
"createdBy": "40011578",
"updatedBy": "40011578",
"userId": 40051331,
"firstName": "Firstname",
"lastName": "Lastname",
"quote": "It is a mistake to think you can solve any major problems just with potatoes.",
"description": null,
"otherLangName": null,
"handle": "test_customer1",
"handleLower": "test_customer1",
"status": "ACTIVE",
"email": "test_customer1@email.com",
"addresses": [
{
"streetAddr1": "100 Main Street",
"streetAddr2": "",
"city": "Chicago",
"zip": "60601",
"stateCode": "IL",
"type": "HOME",
"updatedAt": null,
"createdAt": null,
"createdBy": null,
"updatedBy": null
}
],
"homeCountryCode": "USA",
"competitionCountryCode": "USA",
"photoURL": null,
"tracks": [
"DEVELOP"
],
"updatedAt": "2015-12-02T14:00Z",
"createdAt": "2014-04-10T10:55Z"
}
},
"version": "v3"
},
{
"id": "test_copilot1",
"result": {
"success": true,
"status": 200,
"metadata": null,
"content": {
"maxRating": {
"rating": 1114,
"track": "DATA_SCIENCE",
"subTrack": "SRM"
},
"createdBy": "40011578",
"updatedBy": "40011578",
"userId": 40051332,
"firstName": "Firstname",
"lastName": "Lastname",
"quote": "It is a mistake to think you can solve any major problems just with potatoes.",
"description": null,
"otherLangName": null,
"handle": "test_copilot1",
"handleLower": "test_copilot1",
"status": "ACTIVE",
"email": "test_copilot1@email.com",
"addresses": [
{
"streetAddr1": "100 Main Street",
"streetAddr2": "",
"city": "Chicago",
"zip": "60601",
"stateCode": "IL",
"type": "HOME",
"updatedAt": null,
"createdAt": null,
"createdBy": null,
"updatedBy": null
}
],
"homeCountryCode": "USA",
"competitionCountryCode": "USA",
"photoURL": null,
"tracks": [
"DEVELOP"
],
"updatedAt": "2015-12-02T14:00Z",
"createdAt": "2014-04-10T10:55Z"
}
},
"version": "v3"
},
{
"id": "test_manager1",
"result": {
"success": true,
"status": 200,
"metadata": null,
"content": {
"maxRating": {
"rating": 1114,
"track": "DATA_SCIENCE",
"subTrack": "SRM"
},
"createdBy": "40011578",
"updatedBy": "40011578",
"userId": 40051333,
"firstName": "Firstname",
"lastName": "Lastname",
"quote": "It is a mistake to think you can solve any major problems just with potatoes.",
"description": null,
"otherLangName": null,
"handle": "test_manager1",
"handleLower": "test_manager1",
"status": "ACTIVE",
"email": "test_manager1@email.com",
"addresses": [
{
"streetAddr1": "100 Main Street",
"streetAddr2": "",
"city": "Chicago",
"zip": "60601",
"stateCode": "IL",
"type": "HOME",
"updatedAt": null,
"createdAt": null,
"createdBy": null,
"updatedBy": null
}
],
"homeCountryCode": "USA",
"competitionCountryCode": "USA",
"photoURL": null,
"tracks": [
"DEVELOP"
],
"updatedAt": "2015-12-02T14:00Z",
"createdAt": "2014-04-10T10:55Z"
}
},
"version": "v3"
}
]
}
Loading