Skip to content

Release to support Connect 2.4.5 #174

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 12 commits into from
Aug 31, 2018
Merged

Conversation

ngoctay
Copy link
Contributor

@ngoctay ngoctay commented Aug 28, 2018

…d of `productTemplateId` in milestoneTemplates

topcoder-platform#161 Move all supporting entities endpoints under `/v4/projects/metadata`
- support productTemplate as reference and id of the actual productTemplate as referenceId
- create a new endpoint which returns all the metadata as GET /v4/projects/metadata
- New authorization scheme for project creation endpoint topcoder-platform#171
- Profiling of project service methods topcoder-platform#157
@ngoctay
Copy link
Contributor Author

ngoctay commented Aug 28, 2018

@vikasrohit @gondzo
Please review.
This includes all issues except #162

@vikasrohit
Copy link

Thanks @ngoctay. Is it possible for you to create separate PRs for different issues? Actually, single PR makes things complicated when merging them because it would introduce all changes at once and also makes reverting of one particular fix if there is a problem with that.
If it is not more than 15-30 minutes for you, then please separate it out, otherwise, it is okay for this time, but in future please try to create separate PRs from different feature branches in your fork. Thanks for the hard work!!!

projectUrl: connectProjectUrl(project.id),
timelineId: req.timeline.id,
timelineName: req.timeline.name,
milestoneId: updated.id,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ngoctay @gondzo would it be better to send the original and updated milestone objects instead of sending specific fields of milestones? Rationale is that whoever is subscribing for these events, would be interested in knowing what were the previous and current values of milestone' status so that they can behave differently for different combinations of original vs updated values.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeap, I will update to send the original and updated milestone


req.log.debug('Get m2m token');

m2m.getMachineToken(config.AUTH0_CLIENT_ID, config.AUTH0_CLIENT_SECRET)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move it to utils.js? May be for now create a separate function than getSystemUserToken because that method is being used by some other api calls as well which might fail with m2m in absence of appropriate scope. So, for now a separate function would refactor the code to its desired place, and we can merge the two methods later as separate commit and validate its after effects.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to make util function for:

  1. Get m2m token? or
  2. Get m2m token and make call to identity endpoint?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helper method just to get the m2m token.

@ngoctay
Copy link
Contributor Author

ngoctay commented Aug 28, 2018

@vikasrohit
Sorry for the single complicated PR.

It's hard for me to separate it into single ones now.
When I was working on an issue, I usually found bugs in previous issues ^^. Then I fixed it immediately within the commits for the current issue :(.

Will make separate branch and PR in the future.

- Move the code to get M2M token to util.js#getM2MToken()
src/util.js Outdated
}
return null;
});
return httpClient.get(`${config.identityServiceEndpoint}users`, {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ngoctay why we need this change? I think the old way of getting the details of a particular user should work as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vikasrohit
I tried the old way, but it always returns 404. So I changed like that, and it works.

Could you please double check?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ngoctay I just checked it is working for me in dev. Please restore it to the old way, I would take care of it after merging if it does not work.

@vikasrohit vikasrohit merged commit 3806e9a into topcoder-platform:dev Aug 31, 2018
@vikasrohit
Copy link

@ngoctay @gondzo Merging the PR into dev to test it out live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants