Martin Lehmann
6924de06b0
Fix feature name validation regex
2017-10-23 17:13:26 +02:00
ivaosthu
61cf76b4f6
Bugfix: use basUrl when logging actual request path
2017-10-12 09:19:56 +02:00
Clint Brown
b4084aa705
Allow underscores in name validation
2017-09-19 14:37:23 +10:00
Ivar Conradi Østhus
a7458587f6
Merge pull request #263 from Unleash/expose-version
...
Include module version number in /api reponse
2017-09-09 16:35:34 +02:00
Ivar Conradi Østhus
435d95582e
Merge pull request #264 from Unleash/disable-legacy-routes
...
Added option to disable legacy routes. Closes #244
2017-09-09 16:35:12 +02:00
Ivar
a710cf0321
Clean up intervals.
...
We use intervals in three places and we could probably organise them
better in the future. As long as they all do unref they do not form
any issues for us and I will just let them be as is for now.
This closes #186
2017-09-07 22:52:24 +02:00
Ivar
0a58735636
Added option to disable legacy routes. Closes #244
2017-09-07 21:55:47 +02:00
Ivar
9f02d80b87
Include module version number in /api reponse
2017-09-07 21:21:30 +02:00
Simen Bekkhus
b3fb572f5d
Upgrade prom-client and add gc-stats
2017-08-23 11:36:52 +02:00
Simen Bekkhus
50da40da4b
Replace sinon with lolex
2017-08-23 11:36:44 +02:00
Ivar Conradi Østhus
40a691cafc
Merge branch 'master' into metrics_validation
2017-08-08 17:16:27 +02:00
ivaosthu
13cf218ccf
Fix assert
2017-08-08 16:51:26 +02:00
ivaosthu
f7e11b633b
Added validation of provided LoggerProvider
2017-08-05 15:38:55 +02:00
ivaosthu
1081b9d865
Implement support for logger provider.
...
This allows the users of 'unleash-server' to programatically
change the logger implemnentation. #175
2017-08-04 16:07:17 +02:00
ivaosthu
10c2493e28
Add metrics validation to avoid NaN #253
2017-08-04 11:24:58 +02:00
Ivar Conradi Østhus
5dd460ce7d
Merge pull request #246 from Unleash/lax_client_schema
...
Strip uknown fields in client requests. closes #245
2017-06-29 11:16:20 +02:00
ivaosthu
5780bf30db
Disable x-powered-by express header
2017-06-29 11:12:44 +02:00
ivaosthu
4f1824c271
Strip uknown fields in client requests. closes #245
2017-06-29 11:10:24 +02:00
Ivar Conradi Østhus
98b0ce39a4
Merge branch 'master' into add-sdk-version
2017-06-29 09:57:55 +02:00
sveisvei
4207bec0ac
add editable tests
2017-06-29 08:44:03 +02:00
sveisvei
0e544a27e2
shoulda woulda
2017-06-29 08:44:03 +02:00
sveisvei
942afd74a3
auto disable, and do not serve archived toggle
2017-06-29 08:44:03 +02:00
Simen Bekkhus
f554b2ecaa
Upgrade prom-client and yargs
2017-06-29 08:44:02 +02:00
Ivar
46b82ecd6a
Add support for sdkVersion in client registration
2017-06-28 23:19:19 +02:00
sveisvei
664e019e9b
protection against edit on built in strategies
2017-06-28 21:10:43 +02:00
Sveinung Røsaker
669c860c8d
Merge pull request #241 from Unleash/archive-feature-fix
...
Auto disable archived toggles and do not serve archived toggle
2017-06-28 19:33:38 +02:00
sveisvei
45c2021bd6
auto disable, and do not serve archived toggle
2017-06-28 17:44:14 +02:00
Simen Bekkhus
cdda8d7438
Upgrade prom-client and yargs
2017-06-28 14:34:01 +02:00
sveisvei
447940ed0c
should expose one feature
2017-06-28 12:52:27 +02:00
sveisvei
be4852f63a
Refactor routes setup, move test files, cleanup legacy
2017-06-28 10:20:22 +02:00
sveisvei
5771bcb1bd
Remove legacy data support
2017-06-28 10:18:43 +02:00
sveisvei
20af766086
Prettier/lint
2017-06-28 10:17:14 +02:00
Simen Bekkhus
1c02d73c2c
Log client error ( #225 )
...
* Log client error
* Log all errors
2017-06-21 11:24:36 +02:00
sveisvei
94fdbdb58b
use object.assign and pass along options
2017-06-06 10:17:15 +02:00
sveisvei
efe66c3ff9
pass along hooks, add test to server impl
2017-06-06 09:56:29 +02:00
Ivar Conradi Østhus
419380259d
Merge pull request #200 from Unleash/validate-configured-strategy-shape
...
validate configures strategy shape
2017-03-16 21:03:07 +01:00
Simen Bekkhus
1e76c04c55
Remove uncaught exception logging
...
This is the responsibility of the app
2017-02-22 09:48:00 +01:00
vsandvold
6a4f453713
provides a more helpful error msg when a new feature is created with an existing name
2017-01-28 17:29:22 +01:00
Sveinung Røsaker
839aeb01a6
Merge pull request #199 from Unleash/add-toggle-ep
...
add toggle endpoint
2017-01-09 11:34:59 +01:00
sveisvei
a892c34be4
use post instead of put
2017-01-09 11:06:10 +01:00
sveisvei
26533034b1
validate configures strategy shape
2017-01-08 20:40:50 +01:00
sveisvei
1f5b1c1925
add toggle endpoint
2017-01-08 20:04:46 +01:00
ivaosthu
e4eeea10dd
Add simple API resource #191
2017-01-06 15:58:02 +01:00
ivaosthu
5d58dd56fa
Strategy name can be up to 100chars . Closes #195
2016-12-29 14:17:07 +01:00
Sveinung Røsaker
c2a221be6b
Merge pull request #194 from Unleash/add-ttl-tests
...
Add ttl tests
2016-12-29 12:05:29 +01:00
sveisvei
4d63da7eff
add hook tests
2016-12-29 11:42:54 +01:00
sveisvei
abd16c23ba
add sanity tests for metrics
2016-12-29 11:09:01 +01:00
sveisvei
1cf4424870
evict if new item directly is not eligible
2016-12-29 11:08:41 +01:00
sveisvei
b369953de9
fix typ0 that broke time.now
2016-12-29 11:07:06 +01:00
sveisvei
ed5203d445
add app hooks
2016-12-28 21:04:26 +01:00
sveisvei
dfa490affb
fix lint
2016-12-27 21:03:50 +01:00
ivaosthu
d1e809a9a4
Strategy parameter description is allowed to be empty
2016-12-17 16:47:52 +01:00
ivaosthu
63037b35c3
Added api for updating a strategy
...
relates to #184
2016-12-17 13:00:44 +01:00
ivaosthu
2c46672784
use fake timers for ttl test
2016-12-17 12:55:28 +01:00
sveisvei
d4ddb24b1d
check toggles and strategies in clientapps
2016-12-13 22:43:24 +01:00
ivaosthu
bc82aa6e77
Add schema validation for strategies
2016-12-12 21:44:21 +01:00
ivaosthu
e60c7c5cfc
Fix failing tests
2016-12-12 17:09:44 +01:00
ivaosthu
70c2078539
Strategy list should be sorted by name
2016-12-10 12:12:00 +01:00
sveisvei
fbb0445942
inject metadata on toplevel
2016-12-09 22:03:25 +01:00
sveisvei
4c454d5d08
serve with metadata
2016-12-09 22:01:43 +01:00
sveisvei
3346108594
Revert "Remove /api/client/seen-toggles as we don't need it anyway"
...
This reverts commit 63e6931265
.
2016-12-09 20:21:24 +01:00
ivaosthu
63e6931265
Remove /api/client/seen-toggles as we don't need it anyway
2016-12-09 17:46:08 +01:00
ivaosthu
ab3694cc94
Remove client_strategies table
...
We can just have a strategies column in the client_applications
table. This solves all our needs, and thus avoids the need
for an extra table.
2016-12-09 17:30:12 +01:00
ivaosthu
46c8d83dc1
A client-register should upsert client_applications table
2016-12-09 16:25:18 +01:00
sveisvei
50f3cf9a82
fix lint and mock
2016-12-09 15:25:37 +01:00
sveisvei
80d3f5be1c
client applications
2016-12-09 15:25:37 +01:00
sveisvei
baf2c62f25
recieve togglename to archive or revive via path
2016-12-09 14:54:18 +01:00
sveisvei
d6bdc578c9
uppercase event type key constants
2016-12-09 14:50:30 +01:00
Ivar Conradi Østhus
775b6f5900
Delete app.js
2016-12-05 22:31:45 +01:00
ivaosthu
b56be10276
Added enpoint for fetching application implementing a strategy
...
`/api/client/applications?strategyName=foo` now returns list of
apps implementing that strategy!
2016-12-05 22:20:35 +01:00
sveisvei
7c2196cbc1
send toggleName back
2016-12-05 17:58:29 +01:00
ivaosthu
2eb9e878b1
amend prev commit
2016-12-05 15:50:34 +01:00
ivaosthu
e58bf41b91
fix strateiges format for /client/applications
2016-12-05 15:40:05 +01:00
sveisvei
421a6413bf
fetch seen apps instead
2016-12-05 13:53:53 +01:00
sveisvei
e9938d9a5b
add getAppsFromToggleName
2016-12-05 13:27:18 +01:00
sveisvei
94ee490e0d
fix typ0
2016-12-05 13:27:18 +01:00
sveisvei
77858218cf
only log if num of cleaned is above 0
2016-12-04 22:12:35 +01:00
sveisvei
7513c045c1
add single toggle metric endpoint
2016-12-04 18:08:19 +01:00
sveisvei
5bf0b36588
fix lint
2016-12-04 14:09:37 +01:00
ivaosthu
de55bbc9ef
Option to disable request logging.
...
Because all request details are available via
prometheus there is no need to also log all requests.
This solves #164 but we should still replace log4j with something else.
2016-12-03 14:09:09 +01:00
ivaosthu
7189b0ba33
replace commander with yargs
2016-12-03 13:45:34 +01:00
ivaosthu
10a434a992
more tests
2016-12-02 17:19:59 +01:00
ivaosthu
c3b4f686eb
cleanup bin
2016-12-02 16:34:05 +01:00
ivaosthu
69e2827d9a
minor cleanup
2016-12-02 16:20:13 +01:00
ivaosthu
c32f29e66b
Simplify metrics: We only need timings as it includes counts for free
2016-12-01 18:10:25 +01:00
ivaosthu
c75b12a7ac
cleanup
2016-12-01 17:47:51 +01:00
ivaosthu
5f39115914
Server Metrics: add response time and status codes
2016-12-01 17:43:08 +01:00
ivaosthu
aeb925cb1b
Some Metrics API cleanups
2016-12-01 17:15:55 +01:00
ivaosthu
cfdcf4e2e4
more tests
2016-12-01 00:47:28 +01:00
ivaosthu
b46fb7507f
Server Metrics with Prometheus
...
Implementation use internal eventBus to enable loose counting in the app.
read more at https://prometheus.io/
Closes #98
2016-11-30 23:41:57 +01:00
ivaosthu
f312caca7c
Metrics: wrte api documentation
2016-11-30 19:03:46 +01:00
sveisvei
95388996b9
Better client informations from the API.
...
Impelements:
- http://unleash.host.com/api/client/seen-toggles
- http://unleash.host.com/api/metrics/feature-toggles
- http://localhost:4242/api/client/applications
- http://localhost:4242/api/client/applications/:appName
2016-11-30 19:03:21 +01:00
ivaosthu
84ea153f2a
Should not expose legacy fields to whole system
2016-11-22 22:21:10 +01:00
Ivar
2d8947c30f
Added strategies validation when creating/updating toggles
2016-11-15 21:30:04 +01:00
sveisvei
7460326c5d
add count to app state
2016-11-13 21:25:37 +01:00
sveisvei
c7faf46d26
fix typ0
2016-11-13 21:09:00 +01:00
sveisvei
34f6e5d809
move app and server-impl into lib folder
2016-11-13 21:07:14 +01:00
sveisvei
bb4cf30d22
add tests, rename folders to ava defaults for helpers/fixtures, remove migration og
2016-11-13 20:33:23 +01:00
sveisvei
df99a547e8
add more unit tests for metrics
2016-11-13 18:14:29 +01:00
sveisvei
a44b8987b3
use options obj
2016-11-13 15:58:14 +01:00
ivaosthu
ce5258e6a6
options to specify different db-schema
2016-11-12 11:21:40 +01:00
ivaosthu
5bdaf2cf91
Add unit-test for /health route
2016-11-11 16:24:16 +01:00
ivaosthu
4f25533230
Cleanup route/metrics a bit
2016-11-11 15:46:59 +01:00
ivaosthu
b14c766e97
Started on unit test for metrics-route
2016-11-10 22:05:50 +01:00
ivaosthu
a3afb4c4f5
upgrade log4js to 1.0.1
2016-11-10 21:51:29 +01:00
ivaosthu
9f459e600c
fix tests
2016-11-10 21:16:59 +01:00
ivaosthu
0bd0924aee
remove all lerna stuff
2016-11-10 15:52:49 +01:00
sveisvei
0ffb9b78b6
use lerna for multipackaging
2016-06-18 09:19:57 +02:00
Ivar
761dadabcb
Remove finn config #133
2016-06-16 18:17:07 +02:00
Ivar
2d8fa7ee6b
Statefull modules should be injected from top
2016-06-16 14:35:50 +02:00
Ivar
c1987a76fc
Move all custom-scripts to /scripts folder
2016-06-16 14:27:23 +02:00
ivaosthu
225db218d3
Move all routes to a routes folder
2016-06-16 14:03:49 +02:00
ivaosthu
6cc28ede55
seems like knex 0.11 is more restrict about not using undefined
2016-05-06 11:11:32 +02:00
ivaosthu
65c69369ba
upgrade knex
2016-05-06 09:39:37 +02:00
Anders Olsen Sandvik
f01ef69d7e
#108 Add eslint-config-spt and remove jshint ( #111 )
...
* #108 Add eslint-config-spt
* #108 Ignore bundle.js file
* #108 Change eslint ignore path to a glob file
* Remove jshint and follow more of eslint rules
2016-04-24 22:41:37 +02:00
ivaosthu
3fb86a2803
upgrade node to 4.2.2. Closes #106
2015-12-01 12:05:12 +01:00
giacung
1212e6b266
Health check should verify that it can talk to the toggle-store (aka DB).
...
This commit fixes #103 by doing a simple select against the features table.
2015-10-02 13:54:32 +02:00
Ivar Conradi Østhus
2425a91be7
Merge pull request #92 from finn-no/improvement/reflux
...
Improvement/reflux
2015-03-23 17:43:50 +01:00
Jari Bakken
40b6606a42
Reduce logging in production.
2015-03-10 16:32:40 +01:00
Ivar Conradi Østhus
d495bb1829
Added poller to keep the store in sync with server.
2015-03-05 17:57:42 +01:00
andsandv
94f78797df
Check if strategy exsit before deleting it
2015-02-12 11:41:30 +01:00
andsandv
0ad2bde14a
#80 More renaming
2015-02-09 18:28:51 +01:00
andsandv
f35ea4355a
#80 Rename event ypes
2015-02-06 15:18:54 +01:00
andsandv
3e30193ace
Revert " #80 Change all event types to past tense"
...
This reverts commit a754fcb3a9
.
Might break database so I'll send a pull request.
2015-02-06 15:17:31 +01:00
andsandv
a754fcb3a9
#80 Change all event types to past tense
2015-02-06 15:12:32 +01:00
Ivar Conradi Østhus
2a4a76aaf5
When the user enters his username in to the field
...
a username cookie is updated and will be available
in all subsequent requests.
THIS IS NOT AUTHENTICATION! it is not safe and is
only implemented as a first edition. It does how ever
solve the issue where we are not able to see who
canged what.
2015-02-05 13:39:00 +01:00
Jari Bakken
b1f2bce248
log views: show event diffs by default, toggle to show the full event.
2015-02-04 17:16:59 +00:00
ivaosthu
505d6373cd
Added archived toggles feature #43
2014-12-17 21:57:38 +01:00
ivaosthu
48d2e0c304
API and gui for archiving #43
2014-12-15 22:40:07 +01:00
Jari Bakken
e3a44d0a92
Use TEST_DATABASE_URL for running test against a separate DB.
2014-12-12 16:13:06 +01:00
Jari Bakken
c67b73b5b3
Skip API and create test data in the DB directly (since the API is async)
2014-12-12 16:13:06 +01:00
Jari Bakken
e52c1d16fe
Begin work on running tests against the database:
...
* Add Travis postgresql setup.
* Replace "db mocks" with a before hook that creates the same data
through the HTTP API.
* Reset DB and re-create all fixtures for each test. We'll need
something better here.
* CAVEAT: no concept of a dev vs test database. Running tests will
clear data from the currently configured database.
2014-12-12 16:12:56 +01:00
ivaosthu
00da8d1e3b
Clean up strategyApi with chained-promises
2014-12-10 19:11:52 +01:00
ivaosthu
553f20c3a6
Syntax
2014-12-10 18:51:27 +01:00
ivaosthu
65225ffba0
Validation logic should probably not be in the db-code
2014-12-10 18:49:08 +01:00
ivaosthu
6133f4920b
Cleaned up and changed promises used in the feature API
2014-12-10 18:45:02 +01:00
ivaosthu
778b81f1cd
changed order for feature toggles.
2014-12-10 17:13:26 +01:00
ivaosthu
c16f4a1867
Implemented server side API for deleting strategies.
...
relates to #60
2014-12-08 20:56:22 +01:00
ivaosthu
6eaf18a7f7
strategies should be order after createdAt ASC
2014-11-29 11:51:57 +01:00
Jari Bakken
20c4fe6702
Add ability to create custom stratgies. Closes #11 .
2014-11-25 15:28:31 +01:00
Ivar Østhus
7c5aa8e5bb
strategies should be fetched from DB
2014-11-17 22:39:04 +01:00
Ivar Østhus
e3b8a868d1
Added the default strategies via migration
2014-11-17 21:23:23 +01:00
Gard Rimestad
cf3eaefb46
Improvements on log view
2014-11-17 10:13:30 +01:00
Jari Bakken
92eda2660e
Fix getFeature() semantics
...
It will always reject if the feature is not found, not resolve to null.
2014-11-14 16:58:05 +01:00
Jari Bakken
d591cdad2b
Use knex' map()
2014-11-14 16:40:13 +01:00
Jari Bakken
3d52d97f85
Use knex for DB access. Closes #46 .
2014-11-14 15:06:53 +01:00
Jari Bakken
981c383bb5
Replace PATCH with PUT, which enables editing multiple fields at once.
...
Closes #47 .
2014-11-14 12:56:23 +01:00
Gard Rimestad
f9477e2e35
Fix event api
2014-11-14 07:28:40 +01:00
Gard Rimestad
360c1bc37a
Adding events/:name
2014-11-14 07:13:08 +01:00
Jari Bakken
178f2111dd
Add features.description to db and ui
2014-11-10 16:21:22 +01:00