Commit Graph

377 Commits

Author SHA1 Message Date
olav 9f7d878422 fix: add missing awaits (#1472)
* refactor: silence expected console.error call

* fix: add missing access service awaits

* fix: add missing constraint validation await
2022-04-01 11:10:21 +02:00
olav 1da38781d5 feat: add segment limits (#1469)
* feat: add segment limits

* refactor: move segment limits to constants
2022-04-01 10:53:52 +02:00
olav cf06b562f9 fix: allow instance ID to be empty for metrics (#1471) 2022-04-01 10:34:22 +02:00
olav 66d9d7a6d2 feat: add segments (#1426)
* refactor: fix missing tsconfig path in .eslintrc

* refactor: require contextName and operator

* refactor: fix crash on missing feature strategies

* feat: add segments schema

* feat: add segments client API

* feat: add segments permissions

* refactor: fail migration if things exist

* refactor: remove strategy IDs from responses

* refactor: allow empty description

* refactor: add segment import/export

* refactor: add perf scripts

* refactor: add get segment fn

* refactor: move constraint validation endpoint

* refactor: use a separate id for segment updates

* refactor: use PERF_AUTH_KEY for artillery

* refactor: adjust segment seed size

* refactor: add missing event data await

* refactor: improve method order

* refactor: remove request body limit override
2022-03-29 14:59:14 +02:00
Youssef Khedher d11d0e712b refactor: block creating token for disabled environment (#1464)
* refactor: block creating token for disabled environment

Co-authored-by: olav <mail@olav.io>

* refactore: remove unused deps

Co-authored-by: olav <mail@olav.io>
2022-03-24 11:26:00 +01:00
olav 1cc43c0a4a refactor: always add values to constraints (#1448) 2022-03-17 12:32:04 +01:00
sighphyre 8f60dd6958 Merge pull request #1431 from Unleash/enabled-environments-override
Add enabled environments override flag
2022-03-16 14:45:55 +02:00
sighphyre ba07080aad chore: extend tests for enabled environments 2022-03-16 14:29:11 +02:00
Fredrik Strand Oseberg a236a61623 Fix/user added event (#1437)
* 4.9.0-beta.1

* chore: update unleash frontend

* 4.9.0-beta.2

* fix: add user email to project user events
2022-03-16 08:44:30 +01:00
sighphyre 91fa0ed296 fix: update config tests for enabled environments 2022-03-14 10:01:05 +02:00
sighphyre 8410a8e3ac feat: enabled environments override now also moves projects and toggles to new environments 2022-03-11 15:52:13 +02:00
sighphyre c3b064adfc feat: Add environment variable to set override enabled environments 2022-03-11 11:16:58 +02:00
Fredrik Strand Oseberg 55469801cf feat: validate strategies (#1429)
* feat: validate strategies

* fix: optional coalescing on constraints

* fix: update test
2022-03-10 14:43:53 +01:00
sighphyre 3910e23d2d Merge pull request #1408 from Unleash/feat/init-client-tokens
Load Client Tokens From Environment on Startup
2022-03-09 09:53:47 +02:00
Fredrik Strand Oseberg 6f075e4d1c Feat/new constraint operators (#1397)
* feat: add migration for currentTime context field

* feat: add tests for number validator

* feat: add validation fields for constraint

* feat: add validation for semver, date and legalvalues

* fix: import paths

* fix: only allow specified operators

* fix: add operator test

* fix: reset db

* fix: remove unused import

* fix: set semver as dependency
2022-03-04 17:29:42 +01:00
Youssef 49af49a9d4 fix: lint 2022-03-03 16:26:25 +01:00
Youssef d4521a1c0c fix: changeRole to assign roles without existing members
Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
2022-03-03 14:33:32 +01:00
Ivar Conradi Østhus d264f30fa0 fix: lint 2022-03-03 08:52:44 +01:00
Ivar Conradi Østhus d514356030 fix: avoid scope issues 2022-03-03 08:52:44 +01:00
Ivar Conradi Østhus 321c9a8492 Update src/test/e2e/services/project-service.e2e.test.ts
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-03-03 08:52:44 +01:00
Ivar Conradi Østhus 8a4984fee6 Update src/test/e2e/services/project-service.e2e.test.ts
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-03-03 08:52:44 +01:00
Ivar Conradi Østhus faa87469ff Update src/lib/types/events.ts
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-03-03 08:52:44 +01:00
Ivar Conradi Østhus 7f391e2b48 Update src/lib/types/events.ts
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-03-03 08:52:44 +01:00
Ivar Conradi Østhus f0abc0e0d6 Update src/lib/types/events.ts
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-03-03 08:52:44 +01:00
Ivar Conradi Østhus 017bd75c9c Update src/lib/services/project-service.ts
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-03-03 08:52:44 +01:00
Ivar Conradi Østhus 2f189db394 Update src/lib/services/project-service.ts
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2022-03-03 08:52:44 +01:00
Ivar Conradi Østhus 8364c3b396 fix: add method to change role for project memeber 2022-03-03 08:52:44 +01:00
sighphyre 6de5fdb565 feat: allow startup to load client tokens from env var 2022-03-02 13:44:46 +02:00
Christopher Kolstad fc4d95ff5b fix: configure user endpoint when AuthType is NONE (#1403)
Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-03-01 10:52:22 +01:00
Christopher Kolstad 3704f93ff5 fix: readd orderBy statement to project query (#1394) 2022-02-25 08:32:12 +01:00
Ivar Conradi Østhus 2d4727d25d fix: remove project column from roles if exists 2022-02-24 14:08:41 +01:00
Ivar Conradi Østhus 48e09dbc2a fix: add migration patch
This patch will fix issues introduced in Unleash v3.13.0. It only
affects users trying to upgrade from v3 to v4 and has been using
v3.13.0 which contained an incorrect migration file.
2022-02-24 14:08:41 +01:00
Christopher Kolstad 34e5034547 fix: reduce project overview query count to 2. (#1356)
* fix: reduce project overview query count to 2.

Previously we've been doing N+1 queries for projects, this now changes to doing one query for projects with feature counts, and then one query for membercounts for all projects and merging that with the first query.
2022-02-21 12:46:28 +01:00
olav eb08ed0b55 refactor: add an hoursBack query param to the raw metrics endpoint (#1373)
* refactor: add an hoursBack query param to the raw metrics endpoint

* refactor: explicitly return undefined

* refactor: make parseHoursBackQueryParam non-static

* refactor: add test for hoursBack query param

* refactor: improve arg name

* refactor: add a 1 hour test case
2022-02-17 10:47:05 +01:00
Fredrik Strand Oseberg 6520aa1b0c Feat/impression data (#1310)
* feat: add impression data column

* fix: add default value to impressionData

* fix: allow client api to return impressionData

* fix: add tests for impressionData

* fix: reset server-dev

* fix: add test for adding a toggle with impression data on a different project

* fix: update tests
2022-02-03 11:06:51 +01:00
Ivar Conradi Østhus e5035f96e1 fix: rbac should pick up projectId from path if available 2022-02-01 22:58:52 +01:00
Fredrik Strand Oseberg d2b4eef8ba fix: set migration for feedbacK (#1315) 2022-01-31 09:57:33 +01:00
Ivar Conradi Østhus 19cb991cc9 fix: metric counters should use bigint (#1313) 2022-01-31 08:50:11 +01:00
Ivar Conradi Østhus 1cad01b97e fix: welcome-email should not include password-link when disabled (#1302) 2022-01-28 12:50:35 +01:00
Ivar Conradi Østhus 332b94d209 fix: convert simple-password-provider.test.js to ts 2022-01-26 22:44:26 +01:00
Ivar Conradi Østhus a50d0e2a21 fix: improve API error-handling (#1301)
Unleash is an API and it would simplyfy a lot of the specific
errors could carry the expected HTTP status code for this error.
This would eliminate the need for a gigantic switch/case in the
handle-errors function.
2022-01-26 13:45:22 +01:00
Ivar Conradi Østhus b8399abee0 fix: add migration for old feature events (#1300)
When we change the feature events we introduced a new column
on the events table to ease resolving of feature related events,
instead of knowing the types and require the data object to include
a name property. This commit adds a migration to make sure we
convert all feature events.

fixes: #1299
2022-01-26 13:39:59 +01:00
Ivar Conradi Østhus 14a305f0e7 fix: upgrade node-fetch to version 2.6.7 2022-01-23 21:29:42 +01:00
Fredrik Strand Oseberg 8ecacfb89c Fix/validate context (#1282)
* fix: add context guards

* fix: change error message

* fix: remove console log
2022-01-21 12:02:05 +01:00
Youssef Khedher b9d8c549e8 Merge pull request #1244 from Unleash/feat/update-toggle-type-description
feat: update feature types description
2022-01-21 09:05:21 +01:00
Ivar Conradi Østhus 367b31185b fix: allow charset in content-type (#1241) 2022-01-20 15:00:16 +01:00
Youssef f8c40d1137 refactor: create migration to update feature types description 2022-01-19 19:54:49 +01:00
sighphyre dc920e85ba Fix/add project events (#1267)
* fix: wip project events

* fix: Include deletion events for when a user is removed from a project role

Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
2022-01-14 12:14:02 +01:00
sighphyre e164e3d835 Merge pull request #1266 from Unleash/feat/block-deletion-of-root-roles
fix: Prevent deletion of built in roles
2022-01-14 12:55:55 +02:00
Fredrik Strand Oseberg 1989c53fb0 fix: enable tags and validate for legacy api (#1264)
* fix: enable tags and validate for legacy api

* fix: move delete tag

* fix: test name

* fix: move /api/admin/features
2022-01-14 11:16:17 +01:00