Hello,
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(). To find out more, read the
documentation~[2] or look at the example routes~[3] where these utility
functions are used.
In particular, CXServer, Graphoid and MobileApps should update ASAP, as
these are the services already making requests to these entities. When you
update your service, please let me know as deploying the change will need a
coordinated config and code deploy.
Cheers,
Marko
[1] https://github.com/wikimedia/service-template-node/tree/v0.3.2
[2]
https://github.com/wikimedia/service-template-node/blob/v0.3.2/doc/coding.m…
[3]
https://github.com/wikimedia/service-template-node/blob/v0.3.2/routes/v1.js
--
Marko Obrovac, PhD
Senior Services Engineer
Wikimedia Foundation
tl;dr starting today:
Use:
scap sync 'message for posterity'
instead of:
scap 'message for posterity'
Scap 3.2.0-1 is now alive and well in production which means scap
subcommands are live.
All subcommands are documented[0]. Additional documentation can be
seen by running `scap --help` (or `scap [subcommand] --help`). If you
have any questions feel free to ask them on-list or in IRC on #scap3
or #wikimedia-releng.
Thanks!
Tyler Cipriani and the Deployment Working Group
[0]. Mediawiki:
https://doc.wikimedia.org/mw-tools-scap/scap2/commands.html Scap3:
https://doc.wikimedia.org/mw-tools-scap/scap3/deploy_commands.html
This is a change that affects services that have moved to deployment
via Scap3 (not MediaWiki deployments).
The 3.2.0-1 release that is currently live makes an important change
to the stages in which custom checks may be run. There is now a new
stage called `restart_service` that occurs after the `promote` stage.
The `promote` stage no longer does a service restart. This change is
outlined in the Scap3 docs[0].
This change likely means that you need to move any custom checks (in
scap/checks.yaml) that were intended to run post-service restart to
use the stage `restart_service` rather than `promote`.
For example this check, which depends on a service restart to work correctly:
checks:
service_responds:
type: command
stage: promote
command: curl -Ss localhost:1234
Should now be written as:
checks:
service_responds:
type: command
stage: restart_service
command: curl -Ss localhost:1234
Sorry for any inconvenience. For future releases, changelog highlights
will be sent to the list prior to release.
-- Tyler
[0]. https://doc.wikimedia.org/mw-tools-scap/scap3/quickstart/setup.html#service…
FYI for services deployers that have already switched to Scap3 and those
which will do so soon(TM). I will update the docs on wikitech accordingly
once this is live in production.
Cheers,
Marko
---------- Forwarded message ----------
From: Tyler Cipriani <tcipriani(a)wikimedia.org>
Date: 10 May 2016 at 19:08
Subject: [Engineering] [Breaking Change] Scap change for deployers
To: wikitech-l(a)lists.wikimedia.org, "Development and Operations engineers
(WMF only)" <engineering(a)lists.wikimedia.org>, ops(a)lists.wikimedia.org
tl;dr: Our beloved scap is changing to use subcommands rather than a
bunch of scripts, but the existing scripts will work for a short time.
Starting with the 3.2.0 release[0], which will hit production in the
next day or so, scap will use subcommands rather than using many
different scripts that all call the same underlying code. The scripts
(e.g., deploy, sync-file, sync-dir, sync-wikiversions.) will continue
to work as usual, but they will issue a deprecation warning until the
next release when they will disappear.
The most notable exception is the `scap` command which must be invoked
as `scap sync [message]`.
The docs are updated[1] and you can see new help output there or on
phabricator[2].
Long story short, you will now run:
scap sync-file <path> [message]
Instead of:
sync-file <path> [message]
This change has been cherry-picked on beta cluster and is currently live
there.
<3,
Tyler Cipriani and the Deployment Working Group
[0]. https://gerrit.wikimedia.org/r/#/c/287918
[1]. https://doc.wikimedia.org/mw-tools-scap/
[2]. https://phabricator.wikimedia.org/P3027
_______________________________________________
Engineering mailing list
Engineering(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/engineering
--
Marko Obrovac, PhD
Senior Services Engineer
Wikimedia Foundation