Commit Graph

56 Commits

Author SHA1 Message Date
Ivar Conradi Østhus 3484340cd0 fix: only add project environments if enabled (#1050) 2021-10-21 10:14:35 +02:00
Christopher Kolstad 26407cc02e Fix/feature strategies needs project update (#1040)
* Make sure feature_strategies follow feature to new project
2021-10-19 09:49:43 +02:00
Ivar Conradi Østhus ae03390331 fix: add support for experimental flags (#1025) 2021-10-13 20:52:44 +02:00
Christopher Kolstad 20a4aeff97 Make Appinstance registration include environment (#1014) 2021-10-12 10:39:28 +02:00
Ivar Conradi Østhus fc455811f8 feat/metricsV2 (#1005)
Adds a new way of handling usage metrics where we push it directly to the database and performs aggregation on the fly. All metrics are aggregated in to buckets of hours. We will for now store metrics for the 48 hours with the following dimensions:

- featureName
- projectName
- envrionment
- yes (the actual count)
- no (the actual count)
2021-10-08 10:09:22 +02:00
Ivar Conradi Østhus 3612884501 feat: clone feature toggle API (#1006) 2021-10-08 09:37:27 +02:00
Christopher Kolstad a401580228 task: Disables feature_environments without strategies (#1003) 2021-10-06 09:25:34 +02:00
Ivar Conradi Østhus 54a99460ce fix: add projects api for oss as well 2021-10-01 10:59:43 +02:00
Ivar Conradi Østhus 0a83abe101 fix: add environments to project details (#992) 2021-09-29 12:22:04 +02:00
Christopher Kolstad e3cebb21c8 task: add default environment (#989)
- Adds development and production environments.
- Connects default environment to all projects
- When creating a project connects the project to all enabled
  environments
2021-09-29 11:09:35 +02:00
Christopher Kolstad c870b33ba6 task: remove displayName from environments (#988)
This will require a change in enterprise as well.
2021-09-29 10:23:43 +02:00
Christopher Kolstad 77d781db12 task: Adds FEATURE_ENVIRONMENT_{ENABLED,DISABLED} events (#970)
* task: Adds FEATURE_ENVIRONMENT_{ENABLED,DISABLED} events
2021-09-27 14:07:26 +02:00
Ivar Conradi Østhus 4b7e1f4a81 feat: rename :global: env to "default" (#947)
Our testing and internal validation has proven that
the :global: environment concept confuses people more
than the problems it solves. We have thus decided to
group all configuration that was created before the
environment concept was introduced in to the "default
environment. This would still make everything work
as before in addition to introducing the env concept.

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-09-24 13:55:00 +02:00
Christopher Kolstad 132e801836 Add UPDATE and DELETE TAG_TYPE permissions (#951) 2021-09-24 09:01:15 +02:00
Christopher Kolstad e7b948e9db Add type to environments
- Now returns type as part of the environment object when requesting
  a feature
2021-09-23 16:16:31 +02:00
Christopher Kolstad f85f66d4f5 feat: add project and environment columns to events (#942)
* feat: add project and environment columns to events

* Added events for feature_strategy update

* fix duplicate test key for dbInit

* Fix argument list for toggleService calls in tests
2021-09-20 12:13:38 +02:00
Christopher Kolstad 37d6c4886a Respect sort order when displaying strategies (#943) 2021-09-17 15:11:17 +02:00
Ivar Conradi Østhus c4b697b57d Feat/api key scoping (#941)
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-09-15 20:28:10 +02:00
Fredrik Strand Oseberg 26c9d53b89 feat: Move environments to enterprise (#935)
- Adding, updating and renaming environments are meant to be
  enterprise only features, as such, this PR moves these operations out
  of this server

- We still keep sortOrder updating, toggling on/off and getting one,
  getting all, so we can still work with environments in the OSS version
  as well.

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-09-13 15:57:38 +02:00
Ivar Conradi Østhus 90962434d9 fix: Cleanup new features API with env support (#929) 2021-09-13 10:23:57 +02:00
Ivar Conradi Østhus 11640e882b fix: fine tune db-config based on experience 2021-09-03 12:57:25 +02:00
Ivar Conradi Østhus 635d50e1a8 fix: addon-service should only trigger enabled addons
fixes: #932
2021-09-02 12:46:29 +02:00
Ivar Conradi Østhus aab4602029 fix: add user and project counters 2021-08-27 10:10:14 +02:00
Ivar Conradi Østhus 56cd0d6912 fix: import should not drop built-in strategies 2021-08-26 22:41:51 +02:00
Ivar Conradi Østhus d28df3e3fa Fix/feature events (#924) 2021-08-26 13:59:11 +02:00
Fredrik Strand Oseberg 856c7a358b Fix/switch project endpoint (#923) 2021-08-25 13:38:00 +02:00
Ivar Conradi Østhus d3fbaa6587 fix: add member and toggle count to project list (#918) 2021-08-19 13:25:36 +02:00
Ivar Conradi Østhus 721baa7657 fix: Clean up exported types even more 2021-08-13 19:22:15 +02:00
Christopher Kolstad ff7be7696c fix: Stores as typescript and with interfaces. (#902)
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-08-12 15:04:37 +02:00
Ivar Conradi Østhus 815a75a5b4 Wip/environments (#880)
Adds environment support

This PR adds environments as a first-class concept in Unleash.

It necessitated a full rewrite on how we connect feature <-> strategy, as well as a rethink on which levels environments makes sense.

This enables PUTs on strategy configurations for a feature, since all strategies now have ids.

This also updates export/import format. The importer handles both formats, but export is no longer possible in version 1 of the export format, only in version 2, with strategy configurations for a feature as a separate object.

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-07-07 10:46:50 +02:00
checketts 2f013bacbf chore: Convert client metrics controller to typescript (#831)
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-06-24 19:22:12 +02:00
Ivar Conradi Østhus 4f9deee2ed fix: add option for graceful shutdown (#872)
* fix: add option for graceful shutdown

* fix: gracefulShutdown should close idle keep-alive connections

* fix: eslint import order

* docs: add config options to docs as well
2021-06-17 20:33:34 +02:00
Ivar Conradi Østhus 6c2ec59fa4 fix: Do gracefull shutdown of Unleash on 'SIGINT' & 'SIGTERM' (#870)
Unleash will listen for 'SIGINT' & 'SIGTERM'  and close background tasks and db connections before shutting down. 

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-06-15 12:32:35 +02:00
Fredrik Strand Oseberg 9f33285b03 Feat/pnps feedback (#862)
* feat: setup user feedback service

* fix: map rows

* feat: add tests

* wrap service calls in try catch

* fix: add test for retrieving feedback on user

* feat: add fake user feedback store

* fix: check ffor feedback id in controller

* feat: add test for bad request
2021-06-07 11:11:42 +02:00
Christopher Kolstad 3a65847aa7 Migrate to jest (#854)
* Migrate to jest
* Use --force-exit until dns close handle issue https://github.com/facebook/jest/issues/9982

Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2021-05-28 11:10:24 +02:00
Christopher Kolstad 447e44ee77 fix: readd support for DATABASE_URL_FILE 2021-05-05 11:36:22 +02:00
Ivar Conradi Østhus 0bed8f605e fix: regular users are not API users 2021-05-03 19:33:37 +02:00
Ivar Conradi Østhus 841e2a6e07 fix: more types 2021-05-02 21:11:17 +02:00
Ivar Conradi Østhus 4b48c08e0e fix: move permission to types 2021-05-02 20:58:02 +02:00
Ivar Conradi Østhus 176d2e4dd3 fix: Autehntication required options is optional 2021-04-29 18:52:52 +02:00
Ivar Conradi Østhus df2e23c282 fix: refactor event types 2021-04-29 10:21:29 +02:00
Ivar Conradi Østhus 88a56b8569 fix: move AuthenticationRequired to types 2021-04-29 09:57:45 +02:00
Christopher Kolstad 578078e03f fix: active sessions are now destroyed if auth/reset and auth/validate endpoints are used (#806) 2021-04-27 09:16:44 +02:00
Ivar Conradi Østhus 33782d15d5 fix: add hosted auth option 2021-04-26 21:31:08 +02:00
Ivar Conradi Østhus b4b524a11b feat: add option for LOG_LEVEL (#803) 2021-04-23 15:31:12 +02:00
Christopher Kolstad 8845c90f57 Added enterpriseVersion to root of IUnleashConfig/IUnleashOptions 2021-04-23 11:05:30 +02:00
Fredrik Strand Oseberg c58612fc8f Feat/add new user email (#793)
* feat: send email when adding a new user

* fix: rename method

* fix: create welcome email

* fix: update email templates

* fix: add name to templates

* refactor: reduce database calls to one

* fix: alter tests

* fix: remove console logs
2021-04-23 10:58:47 +02:00
Ivar Conradi Østhus b0e6d8c363 fix: User should require a ID field set (#799) 2021-04-22 23:40:52 +02:00
Ivar Conradi Østhus 424d4e209e fix: introduce settingService 2021-04-22 22:54:08 +02:00
Ivar Conradi Østhus 185091174f fix: convert AUTH_TYPE to uppercase (#797)
Make sure we support both `AUTH_TYPE=demo` and `AUTH_TYPE=DEMO`

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2021-04-22 15:04:08 +02:00