Commit Graph

46 Commits

Author SHA1 Message Date
Christopher Kolstad 2850052cc5 fix: Clear-Site-Data header needs to be double quoted 2021-04-06 16:09:09 +02:00
Ivar Conradi Østhus dfb890c638 Feat: Api-Tokens (#774)
fixes: #774
2021-03-29 19:58:11 +02:00
Ivar Conradi Østhus b6793d2957 fix: version-checker must have instanceId 2021-03-26 14:38:51 +01:00
Ivar Conradi Østhus 5d284e3ac9 fix: ensure createdBy is not empty 2021-03-26 13:57:01 +01:00
Christopher Kolstad acc39fe38d chore: another missing type 2021-03-26 12:35:14 +01:00
Christopher Kolstad f191d76737 chore: type argument missing 2021-03-26 12:34:37 +01:00
Christopher Kolstad 205ad921d4 Tags and tag types to ts (#772)
* chore: Converted tag-store and tag-type-store to ts

* chore: Converted tag service and tag type service to ts
2021-03-26 11:03:30 +01:00
Ivar Conradi Østhus ad04eeb9b5 fix: All migrations requires down step 2021-03-25 08:37:15 +01:00
Christopher Kolstad 2e13bb9368 Make sure we keep the announced status of each app (#770)
* Make sure we keep the announced status of each app

- Since we were running onConflict().merge() we were keeping our entire
  new object from our remapRow method, and that was overwriting the
  current announcement status of the row back to false, unless we'd by
  random chance actually set the announced property on our row to be
  inserted.
* Add migration for cleaning up application-created events
-
fixes: #769
2021-03-23 12:43:33 +01:00
Ivar Conradi Østhus 7e7554c0ae fix: convert event-store to typescript (#768) 2021-03-23 08:46:01 +01:00
Ivar Conradi Østhus 9bd23dc735 fix: Make e2e test more stable (#767)
make sure we destroy all the stores which should also cancel
any background work they have for the database.
2021-03-19 22:25:21 +01:00
Christopher Kolstad 780464d3ad fix: delete duplicate client instances
- Due to applying a primary key constraint on app_name, instance_id,
  active installations with client_instances that have already violated
  this unique constraint will fail to migrate.
- This commit drops all but the latest instance of each (app_name,
  instance_id) tuple, thus preparing the database for applying the
  unique constraint

Co-authored-by: Ivar Conradi Osthus <ivarconr@gmail.com>
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-03-19 11:56:57 +01:00
Ivar Conradi Østhus e3196675c9 fix: event tags does not need undefined guard
the default in the db is "[]" anayways.
2021-03-18 19:25:45 +01:00
Ivar Conradi Østhus 6d8ccaf88b fix: inital event.tags should be array type 2021-03-18 09:48:11 +01:00
Christopher Kolstad 3e2ec968f2 fix: always set instanceid in uiconfig 2021-03-15 08:46:28 +01:00
Christopher Kolstad 289cf85a3c Add import/export for tags and projects (#754)
* Add import/export for tags and projects

Tags includes (tags, tag-types and feature-tags)

fixes: #752
2021-03-12 11:08:10 +01:00
Ivar Conradi Østhus e1fbe9d013 feat: Default roles and RBAC permission checker. (#735)
This PR Introduces first steps towards RBAC according to our specifications. Rbac will assume users to exist in the Unleash user table with a unique id. This is required to make correct mappings between users and roles.
2021-03-11 22:51:58 +01:00
Ivar Conradi Østhus 40bde7c08b fix: projectId must follow nameType in query 2021-03-05 14:12:56 +01:00
Christopher Kolstad 9e649118e5 fix: publish events about unannounced applications
fixes: #747
2021-03-05 14:01:15 +01:00
Ivar Conradi Østhus f4aba80763 fix: messages to slack for archied toggles (#750)
Co-authored-by: Fredrik Strand Oseberg <fredrik.no@gmail.com>
2021-03-05 12:59:35 +01:00
Christopher Kolstad 5c795bdaa7 fix: makes eventstore emit id and createdAt (#746)
fixes: #703
2021-03-04 14:08:53 +01:00
Christopher Kolstad 31082e5227 fix: don't use hardcoded timestamps as default values (#745)
fixes: #741
2021-03-04 13:43:52 +01:00
Fredrik Strand Oseberg 8e0bae7352 feat/return feature on create (#742)
* feat: return feature on create

* refactor: change test to verify returning object

* fix: return undefined instead of null
2021-03-04 13:28:31 +01:00
Christopher Kolstad ec3d6e95bc chore: remove superfluous logging from client registration 2021-03-04 13:04:32 +01:00
Christopher Kolstad ec2c6e8824 fix: incorrect sql syntax in migration.
fixes: #743
2021-03-04 12:55:28 +01:00
Christopher Kolstad 4808eb32ff feat: add support for bulk operations on client apps/instance registr… (#744)
* feat: add support for bulk operations on client apps/instance registration
-- stores client registrations for 5 seconds, then runs distinct and inserts them into db

fixes: #732
2021-03-04 12:54:13 +01:00
Ivar Conradi Østhus 7b2b4acbb6 fix: add unit test for addon-retry 2021-02-28 22:40:04 +01:00
Ivar Conradi Østhus 05e69e6663 fix: not crash if addon http post throws (#738)
added try/catch logic around fetchRetry function so that we do not
crash if addon fetch call throws
2021-02-26 13:46:56 +01:00
Ivar Conradi Østhus 24d2aa5dea chore: more docs 2021-02-25 22:27:11 +01:00
Ivar Conradi Østhus 55dd2ed72b fix: project id should be validated correctly on create 2021-02-24 13:24:28 +01:00
Christopher Kolstad 7be884637f fix: make sure test-data is urlsafe 2021-02-24 12:29:42 +01:00
Christopher Kolstad 44af41547e feat: make client features endpoint memoizable (#734) 2021-02-24 12:29:39 +01:00
Clint Checketts 5f83fbc43d chore: Add eslint rules and fix strings to pass rules 2021-02-22 22:20:10 -07:00
Clint Checketts 46c55c865f chore: Switch FeatureHasTagError back to js 2021-02-22 21:58:29 -07:00
Clint Checketts d1933bcd1b chore: Add TS support to code coverage 2021-02-22 21:58:29 -07:00
Clint Checketts 6643de66a5 chore: Begin converting files from JS to TypeScript 2021-02-22 21:57:58 -07:00
Christopher Kolstad 35486efe77 Add instance id to ui-config endpoint 2021-02-22 14:21:23 +01:00
Christopher Kolstad 7ee36d2aea chore: better uuid name 2021-02-19 11:28:35 +01:00
Christopher Kolstad ba57822d23 fix: generate uuid in js migration instead of from db 2021-02-19 11:27:29 +01:00
Christopher Kolstad c2db551252 fix: Don't check version when starting up in dev mode 2021-02-19 11:16:35 +01:00
Christopher Kolstad b83387a84a Add a version service (#729)
- Checks versions against https://version.unleash.run
- Generates a unique instance id (uuid)
2021-02-19 11:13:25 +01:00
Ivar Conradi Østhus b17e9a4bda feat: Introduce specific "feature stale" events (#727)
fixes: #776
2021-02-18 09:18:04 +01:00
Christopher Kolstad d017ec7cdc feat: add db-session store (#722)
* Moves to db managed sessions.
2021-02-18 09:03:21 +01:00
Christopher Kolstad 8bf4214ddb feat: Handle database connection errors with 500 (#725)
* feat: Handle database connection errors with 500

- If database goes away while unleash is running, unleash now stays
  running, but all api endpoints will return 500.
- This includes our health endpoint, which allows k8s or similar
  orchestrators to decide what should be done, rather than Unleash
  terminating unexpectedly
2021-02-17 15:24:43 +01:00
checketts f49b5084eb fix: gh-720 Use express path templates for prometheus metrics (#724) 2021-02-15 13:04:56 +01:00
Fredrik Strand Oseberg c1aab06798 Feature/setup typescript
This sets up the typescript compiler.

Allowing gradual migration to typescript.

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com>
Co-authored-by: Fredrik Oseberg <fredrik.oseberg@getunleash.ai>
Co-authored-by: Clint Checkett <clintchecketts@churchofjesuschrist.org>

fixes: #676
2021-02-12 11:42:00 +01:00