Page MenuHomePhabricator

cxserver: update to service-template-node v0.4.0
Closed, ResolvedPublic

Description

As per https://lists.wikimedia.org/pipermail/services/2016-May/000052.html

Service-template-node v0.3.2~[1] has been released. This is an important
update for all services that contact the MW Action API or RESTBase, as it
brings a unified way of dealing with such requests. To make requests
against the MW API use apiUtil.mwApiGet() (from lib/api-utils.js), while
for RESTBase there is apiUtil.restApiGet().

Additionally, as per https://lists.wikimedia.org/pipermail/services/2016-July/000067.html:

service-template-node v0.4.0 has just been released~[1]. The new version
represents an important security and feature upgrade from v0.3.2 and you
are urged to update as soon as possible~[2].

Event Timeline

FYI, it would probably be best for you if you switched from tabs to 4 spaces in the source code repo, as that would ease updating, but would also be aligned with the way code in other services' repos is structured.

FYI, it would probably be best for you if you switched from tabs to 4 spaces in the source code repo, as that would ease updating, but would also be aligned with the way code in other services' repos is structured.

That is just one difference in formatting. cxserver uses the MediaWiki js coding convention with same jshint/jscs/jsbeautify wikimedia presets. Apparently other services are not using it. Using same conventions in MW extension and services has some advantages for us.

Change 292894 had a related patch set uploaded (by Santhosh):
WIP: Use api-util from service-template-node for RESTBase API

https://gerrit.wikimedia.org/r/292894

@mobrovac I came across this issue while working on this task https://github.com/wikimedia/service-template-node/issues/61

My mistake. works with updated swagger-router.

mobrovac renamed this task from cxserver: update to service-template-node v0.3.2 to cxserver: update to service-template-node v0.4.0.Jul 22 2016, 3:05 PM
mobrovac updated the task description. (Show Details)

Here is the list of commits that are not included in CXServer:

  • a511596 - Release v0.4.0 (#68)
  • 8cd10c3 - remove in-tree docs; link to on-wiki documentation (#62)
  • 55bdde9 - Automatically send metrics for each incoming request (#67)
  • 6a46cb4 - Include core-js and bump service-runner to v2.0.4
  • aab8a57 - Check for vulnerabilities with nsp on npm test (#65)
  • 82886c8 - Update depenedencies
  • 18e3f61 - Use Node 4.4.6 for building the deploy repo and Travis (#64)
  • 3ac418b - Update to service-runner@v2 (#63)
  • bc51980 - Add library functions for accessing the MW and REST APIs (#60)
  • bba84b2 - doc fix: marked createRouter() param as optional
  • 6f6c95a - Report the incoming request on every log line
  • 8d2d86e - Minor improvements and release v0.3.1 (#56)
  • 4b1e772 - Release v0.3.0 (#55)
  • 05bf8f4 - Regenerate static/index.html (#54)
  • ead353f - Docs: document the deploy.submodule configuration directive
  • ede1db1 - Release v0.2.3
  • 7ee56e7 - Update dependencies
  • 81255a0 - Temp: Skip the failing gzipped content test
  • c05ddb9 - Travis YAML: Remove iojs testing and add Node 5.1
  • 56e21c3 - Set the default build target to 'debian'
  • 01eb28f - Logger: Log the stack trace only for 500 errors
  • d30a2b6 - CSP Headers: Allow the configuration of sending the security headers

https://gerrit.wikimedia.org/r/#/c/292894 currently contains only partially bc51980 and 01eb28f, but the other commits are still missing. Please go through the list and include them.

Updated the patch as follows:

Here is the list of commits that are not included in CXServer:

  • a511596 - Release v0.4.0 (#68)
  • 8cd10c3 - remove in-tree docs; link to on-wiki documentation (#62)

NA

  • 55bdde9 - Automatically send metrics for each incoming request (#67)

Present in https://gerrit.wikimedia.org/r/#/c/292894/

  • 6a46cb4 - Include core-js and bump service-runner to v2.0.4

Done in https://gerrit.wikimedia.org/r/#/c/292894/

  • aab8a57 - Check for vulnerabilities with nsp on npm test (#65)

Present in https://gerrit.wikimedia.org/r/#/c/292894/

  • 82886c8 - Update depenedencies

Present in https://gerrit.wikimedia.org/r/#/c/292894/

  • 18e3f61 - Use Node 4.4.6 for building the deploy repo and Travis (#64)

Travis not applicable. Node version update present in Present in https://gerrit.wikimedia.org/r/#/c/292894/

  • 3ac418b - Update to service-runner@v2 (#63)

Present in https://gerrit.wikimedia.org/r/#/c/292894/

  • bc51980 - Add library functions for accessing the MW and REST APIs (#60)

https://gerrit.wikimedia.org/r/#/c/292894/5/utils/api-util.js

  • bba84b2 - doc fix: marked createRouter() param as optional

Present in https://gerrit.wikimedia.org/r/#/c/292894/5/utils/util.js

  • 6f6c95a - Report the incoming request on every log line

https://gerrit.wikimedia.org/r/#/c/292894/5/utils/util.js

  • 8d2d86e - Minor improvements and release v0.3.1 (#56)

NA

  • 4b1e772 - Release v0.3.0 (#55)

NA

  • 05bf8f4 - Regenerate static/index.html (#54)

NA

  • ead353f - Docs: document the deploy.submodule configuration directive

NA

  • ede1db1 - Release v0.2.3

NA

  • 7ee56e7 - Update dependencies

In sync. Had updated in https://github.com/wikimedia/mediawiki-services-cxserver/commit/7382ee7698ceb3087abc836dff0af0ae8872561f and fresh update at https://gerrit.wikimedia.org/r/#/c/292894/

  • 81255a0 - Temp: Skip the failing gzipped content test

No such test in cxserver

  • c05ddb9 - Travis YAML: Remove iojs testing and add Node 5.1

cxserver does not use Travis yet

  • 56e21c3 - Set the default build target to 'debian'

It is debian in cxserver master https://github.com/wikimedia/mediawiki-services-cxserver/blob/master/package.json#L56

  • 01eb28f - Logger: Log the stack trace only for 500 errors

Present in https://gerrit.wikimedia.org/r/#/c/292894/

  • d30a2b6 - CSP Headers: Allow the configuration of sending the security headers

Present in https://gerrit.wikimedia.org/r/#/c/292894/

https://gerrit.wikimedia.org/r/#/c/292894 currently contains only partially bc51980 and 01eb28f, but the other commits are still missing. Please go through the list and include them.

Change 292894 merged by jenkins-bot:
Update with service-template-node v0.4.0 changes

https://gerrit.wikimedia.org/r/292894

Change has been merged, resolving. Thnx @santhosh !

Note: deployment is pending, to go out with https://gerrit.wikimedia.org/r/#/c/304444/ .