Eric Mc Sween
3581d0ce87
3.5.0
2021-01-11 08:03:49 -05:00
Eric Mc Sween
8dcbd5aec0
Add support for the swagger-tools router
...
The swagger-tools router puts the request path in the
req.swagger.apiPath property.
2021-01-08 14:53:29 -05:00
Eric Mc Sween
7274217d79
Decaf cleanup
2021-01-08 14:48:13 -05:00
Jakob Ackermann
96b585544a
[misc] version bump to 3.2.0
...
- [OError] getFullInfo returns the error context of nested causes (#14 )
2020-12-02 12:32:41 +00:00
Jakob Ackermann
a5e5d9b1cd
[OError] getFullInfo returns the error context of nested causes ( #14 )
...
* [OError] add getFullInfoIncludeCause for retrieving nested cause info
* Revert "[OError] add getFullInfoIncludeCause for retrieving nested cause info"
This reverts commit 4c7517255a0f37ba94223e559a3926f19bab618d
* [OError] getFullInfo returns the error context of nested causes
* [OError] getFullInfo flip sequence of merging, add test case for it
2020-12-02 11:44:17 +00:00
Jakob Ackermann
8e76e79a83
[misc] version bump to 3.4.1
2020-11-25 11:25:27 +00:00
Jakob Ackermann
6452959482
[misc] do not access potentially undefined opts
2020-11-11 11:35:33 +00:00
Jakob Ackermann
e34f17a352
[misc] creating a redis client with redis-sentinel opts throws an error
2020-11-11 11:31:44 +00:00
Jakob Ackermann
bcd5abadce
[misc] version bump to 2.0.0
2020-11-10 10:46:42 +00:00
Jakob Ackermann
41aa5ec876
[misc] rename package to @overleaf/redis-wrapper
2020-11-10 10:46:41 +00:00
Jakob Ackermann
d7eb8c7ecf
[misc] refresh package.json
...
- trim down the files for publishing
- drop sentinel from description
- Overleaf is the new author
- add repository reference
2020-11-10 10:46:41 +00:00
Jakob Ackermann
aabe2d18b9
[misc] rewrite: squash history
...
- promisify
- merge health check for single node and cluster
- replace the first multi with simple SET in health check
- reworked health check with o-error context/stack-traces for failures
- drop console.error on health check timeout, consumer logs the error
- cleanup unwrapping of ioredis multi result
- Promise support for multi.exec
This has been squashed from das7pad s fork.
REF: b3dd8c5cf4cc6482fd450e6bb67013508844f93f
2020-11-10 10:34:06 +00:00
Jakob Ackermann
ccf4bb1e0e
[misc] test/scripts: use logger-sharelatex for logging as in production
2020-11-10 10:15:03 +00:00
Jakob Ackermann
d827b521c6
[misc] test/unit: loosely match the passed redis options
...
The rewrite will pass a cloned object through.
2020-11-10 10:10:22 +00:00
Jakob Ackermann
4aebc1b0b6
[misc] rewrite: free functions
2020-11-10 10:10:22 +00:00
Jakob Ackermann
da8bef821b
[misc] decaffeinate: decaffeinate module
2020-11-10 10:10:21 +00:00
Jakob Ackermann
c973c5b188
[misc] decaffeinate: rename 2/2
2020-11-10 10:10:21 +00:00
Jakob Ackermann
45bf2abb14
[misc] decaffeinate: rename 1/2
2020-11-10 10:10:20 +00:00
Jakob Ackermann
830d6275b3
[misc] add scripts for testing redis cluster
2020-11-10 10:10:06 +00:00
Jakob Ackermann
7b69cc42c9
[misc] decaffeinate tests: decaffeinate unit tests
2020-11-09 17:52:29 +00:00
Jakob Ackermann
7210b3dfed
[misc] decaffeinate tests: decaffeinate standalone script
2020-11-09 17:52:20 +00:00
Jakob Ackermann
0a2171e9f0
[misc] decaffeinate tests: rename
2020-11-09 16:57:08 +00:00
Jakob Ackermann
1a090b7b46
[misc] add editor config, eslint, prettier boiler plate
...
versions taken from o-error (prettier-eslint-cli from real-time)
2020-11-09 16:56:56 +00:00
Jakob Ackermann
7eccce2ed0
[misc] reference module via js/loose file extension
2020-11-09 16:16:11 +00:00
Jakob Ackermann
69df7f5bb3
[misc] move test scripts into test/ tree
2020-11-09 16:11:11 +00:00
Jakob Ackermann
39809562fd
[misc] use plain mocha for testing and bump devDependencies
2020-11-09 16:03:33 +00:00
Jakob Ackermann
dddb431034
[misc] drop unused async
...
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-11-09 16:02:30 +00:00
Jakob Ackermann
a53eef5e3d
[healthCheck] bring back support for redis cluster
...
Assume `cluster-require-full-coverage=yes` is set for the redis cluster,
which is the default value.
We are writing into a single hash slot, resulting in a partial health
check only.
The 'cluster-require-full-coverage=yes' blocks writes as soon as any
hash slot is not covered by an active primary.
We are leveraging the health check build into the redis cluster topology
to bring the scope of the single read/write/delete to the full cluster.
REF: 1b3566d6c830289dc826da1d13b75d68205d8dec
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
2020-11-09 16:02:29 +00:00
Jakob Ackermann
18fa184230
[misc] drop references for 'redis' package from unit tests
2020-11-09 16:02:25 +00:00
Jakob Ackermann
90ad28c51c
[misc] drop support for redis-sentinel
2020-11-09 15:59:28 +00:00
Jakob Ackermann
2d1c84ea2e
[misc] fix collection of open sockets
...
```
> require('http').globalAgent.sockets
{ 'HOST:PORT:': [{ ... }, { ... }] }
```
- `new URL('http://HOST:PORT :')` throws
-> test suite `open_sockets`
- gauges were not cleaned up after no agents were present for a given
key. This lead to continuous emission of the previous connection
count for a given hostname, following the completion of all requests.
-> test suite `when all requests complete`
2020-11-06 15:16:14 +00:00
Eric Mc Sween
142d9a5716
3.4.0
2020-10-30 07:39:47 -04:00
Eric Mc Sween
20b3d5070c
Export a configured prom-client
...
Metrics.initialize() and Metrics.configure() will configure the default
Prometheus registry with default "app" and "host" labels. The configured
prom-client module is available as Metrics.prom.
2020-10-29 09:49:55 -04:00
Christopher Hoskin
725478d95f
Release 3.3.0
2020-10-27 14:02:21 +00:00
Christopher Hoskin
f874291998
Bump google-cloud trace-agent, debug-agent and profiler to latest
2020-10-26 17:40:18 +00:00
Christopher Hoskin
d4a649353f
Commit package-lock.json
2020-10-26 17:33:43 +00:00
Christopher Hoskin
fedc3191b8
Bump node to 10.19
2020-10-26 17:33:24 +00:00
Eric Mc Sween
0fdfa706f7
Make 404 error handling on deletes more specific
...
The GCS persistor error handler ignores 404 errors on deletes. However,
the net is too wide cast, and 404 errors coming from the dual-bucket
lifecycle mechanism are also ignored.
2020-10-15 10:35:52 -04:00
Simon Detheridge
60931b86c3
Don't try to delete files if none are found in a directory
2020-10-13 09:53:19 +01:00
John Lees-Miller
9b739f1c7d
Bump version to 3.1.0
2020-09-25 16:10:12 +01:00
Eric Mc Sween
9089d332ab
Add a "unsignedUrls" option to the GCS persistor
...
This boolean option disables URL signing. Instead, getRedirectUrl()
returns the plain GCS download URL.
2020-09-22 15:59:13 -04:00
Eric Mc Sween
0fdbb2dcc0
Add .npmignore to avoid publishing config files
2020-09-17 10:44:24 -04:00
Eric Mc Sween
bd1a1dbabf
3.2.1
2020-09-17 10:40:34 -04:00
Eric Mc Sween
2f35db4087
Fix startup crash
...
Version 3.2.0 crashes on startup because it calls buildPromKey() without
arguments. To avoid this kind of obvious bug to happen again, I added
some basic acceptance tests.
2020-09-17 10:30:25 -04:00
John Lees-Miller
258cc08717
Add a limit on the number of tags, OError.maxTags ( #13 )
...
* Add OError.maxTags
* Tidy up package scripts and add a build script
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
2020-09-17 15:17:44 +01:00
Eric Mc Sween
c413f4d8a4
Fixed some function names in the docs
2020-09-15 16:13:58 -04:00
Eric Mc Sween
ec0441bc89
3.2.0
2020-09-15 08:37:05 -04:00
Eric Mc Sween
c05bd83e24
Add a separate configure() method
...
configure() sets options in the metrics module, but does not start the
default metrics collectors and the profiling agents.
2020-09-15 08:36:03 -04:00
Eric Mc Sween
3c9c17c22f
Remove "using prometheus" log
...
We now always use prometheus
2020-09-11 15:59:38 -04:00
Eric Mc Sween
6f69fb4869
Decaf cleanup: move functions to top level
2020-09-11 15:59:38 -04:00
Eric Mc Sween
afecfd5212
Decaf cleanup: use default parameters
2020-09-11 15:59:38 -04:00
Eric Mc Sween
d7e4b3fe33
Decaf cleanup: unnecessary returns
2020-09-11 15:59:38 -04:00
Eric Mc Sween
6c020f6e54
Decaf cleanup: remove Array.from()
2020-09-11 15:59:38 -04:00
Eric Mc Sween
971a768c4e
Install prettier and eslint
2020-09-11 15:59:33 -04:00
John Lees-Miller
ea2d76de51
Improve tagging for a (maybe) null error ( #12 )
...
* Document a way of handling an error that might be null
* Make typecheck strict
* Test some edge cases
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
2020-09-11 10:05:54 +01:00
Brian Gough
c530422f1e
update package version to 3.1.0
2020-09-04 15:52:05 +01:00
Jakob Ackermann
71ba4150fe
[misc] enable compression for the /metrics route
2020-09-04 15:32:48 +01:00
Brian Gough
b6b65b9638
Merge pull request #39 from overleaf/jpa-res-headers-public-api
...
[http] use public node api for getting the response content-length
2020-09-04 14:52:20 +01:00
Eric Mc Sween
967dde280e
Disable auto-decompression in GCS persistor
...
The GCS library automatically decompresses files with Content-encoding:
gzip. This is very useful, but the S3 library doesn't do that, so we
need to disable the feature in GCS so that it behaves the same way other
persistors behave.
2020-08-18 16:04:54 -04:00
Jakob Ackermann
6f4829e817
[misc] fix module importing
2020-08-17 14:43:08 +01:00
Jakob Ackermann
37fda043d4
[http] use public node api for getting the response content-length
2020-08-17 11:59:18 +01:00
Christopher Hoskin
a66708a319
Ignore error
2020-08-11 10:56:51 +01:00
Christopher Hoskin
8649277c9f
Format:fix
2020-08-11 10:55:03 +01:00
Christopher Hoskin
ea502a0623
Put LoggingManager.initialize back as it was in tests
2020-08-11 10:52:53 +01:00
Christopher Hoskin
20f2e1eb1d
Don't catch checkLogLevel
2020-08-11 10:48:44 +01:00
Christopher Hoskin
9b21292b44
Ensure fetchResponse.text is a string in sinon stub
2020-08-11 10:47:31 +01:00
Christopher Hoskin
46b22b30c7
Fix test description
2020-08-11 09:46:52 +01:00
Christopher Hoskin
3a2ff4e7b5
Merge branch 'master' into csh-metadata-fallback-node-fetch
2020-08-11 09:44:28 +01:00
Simon Detheridge
1115e1a1e6
Add default parameter for 'opts' in MigrationPersistor.getObjectStream
2020-08-10 16:44:37 +01:00
Brian Gough
e5747fefd2
remove package-lock.json (not needed for library)
2020-08-06 14:52:07 +01:00
Brian Gough
5b39d49358
use scoped package name @overleaf/metrics
2020-08-05 11:27:56 +01:00
Jakob Ackermann
397d5c8f1f
[misc] fix prettier-eslint glob for real -- include tests
2020-07-31 13:26:28 +01:00
Christopher Hoskin
e32411eaaa
Clean up acceptance tests
2020-07-30 15:23:04 +01:00
Christopher Hoskin
57ef07dc67
lint and format
2020-07-30 15:08:22 +01:00
Christopher Hoskin
8376cf1ca2
Get acceptance tests working
2020-07-30 15:06:32 +01:00
Christopher Hoskin
6917847b10
catch
2020-07-30 14:45:49 +01:00
Christopher Hoskin
74e2a5eaa1
WIP
2020-07-30 13:53:48 +01:00
Christopher Hoskin
1ca6269aa5
Bump version to 2.2.0
2020-07-24 12:18:33 +01:00
Christopher Hoskin
d42bd2da50
Tidy up
2020-07-24 12:17:31 +01:00
Christopher Hoskin
6bc0d15d78
LOG_LEVEL_SOURCE env taking values file, gce_metadata or none, default file
2020-07-24 11:59:23 +01:00
Christopher Hoskin
0a15fedb34
Remove debug logs
2020-07-24 09:12:59 +01:00
Christopher Hoskin
02356c7f27
All logging manager tests working
2020-07-24 09:12:59 +01:00
Christopher Hoskin
6961f41488
Promisfy log level checks
2020-07-24 09:12:59 +01:00
Christopher Hoskin
6b8dd86a26
WIP
2020-07-24 09:12:59 +01:00
Christopher Hoskin
14bac39222
Add MOCHA_GREP for testing
2020-07-24 09:12:59 +01:00
Christopher Hoskin
40a08bebdb
WIP
2020-07-24 09:12:59 +01:00
Christopher Hoskin
50d2856841
Re-instate metadata request as fallback for CLSI
2020-07-24 09:12:59 +01:00
Simon Detheridge
8037208800
Bump dependency versions
2020-07-23 10:33:01 +01:00
dependabot[bot]
98e4444585
Bump lodash from 4.17.15 to 4.17.19
...
Bumps [lodash](https://github.com/lodash/lodash ) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-07-18 15:48:52 +00:00
dependabot[bot]
2c088b3d20
Bump lodash from 4.17.15 to 4.17.19
...
Bumps [lodash](https://github.com/lodash/lodash ) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-07-17 17:09:14 +00:00
Brian Gough
d415ae0cbe
remove gruntfile
2020-07-17 16:23:01 +01:00
Brian Gough
a0f856cff2
fix tests
2020-07-17 16:17:18 +01:00
Brian Gough
747a80b545
decaffeinate
2020-07-17 16:01:58 +01:00
Brian Gough
e31a819636
remove statsd
2020-07-17 15:36:37 +01:00
Eric Mc Sween
6521837993
Add S3 options: httpOptions, maxRetries
2020-07-09 17:50:05 -04:00
Eric Mc Sween
3e7e4369af
Implement getRedirectUrl() for the S3 backend
2020-07-08 17:13:20 -04:00
Eric Mc Sween
523ff9c4cd
Support metadata when uploading objects
...
Add contentType and contentEncoding options to sendStream(). These
options will set the corresponding metadata on the object.
This changes the API. The fourth argument to sendStream() used to be the
source md5. Now, it's an options object and the source md5 is a property
of that object.
2020-07-08 08:13:53 -04:00
Simon Detheridge
990bacf3c2
Update to OError3
2020-07-07 10:40:37 +01:00
Eric Mc Sween
e197e4dc11
2.7.0
2020-07-06 08:20:02 -04:00
Eric Mc Sween
d69195eaa9
Log requests that don't have a route property
...
The v1 history service has its routes set up via swagger-tools, which
doesn't write a route property on the request. This prevents us to send
request metrics based on the route, but we can still log the request.
2020-07-03 16:38:29 -04:00