1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
Commit Graph

2443 Commits

Author SHA1 Message Date
Tymoteusz Czech
d58214cedd
fix: error logger catchall 2024-10-24 13:08:25 +02:00
gitar-bot[bot]
589d9f1af7
[Gitar] Cleaning up stale flag: displayTrafficDataUsage with value true (#8481) 2024-10-24 08:05:06 +02:00
Jaanus Sellin
9839b77008
feat: rework application overview db query (#8518)
Previously we were returning all instance names from database, but now
we count them in database.
2024-10-23 16:05:01 +03:00
gitar-bot[bot]
f2ee02ed9e
[Gitar] Cleaning up stale flag: collectTrafficDataUsage with value true (#8480) 2024-10-23 14:32:09 +02:00
Mateusz Kwasniewski
faaf54ca99
feat: email service for productivity report (#8517)
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2024-10-23 11:53:43 +02:00
Melinda Fekete
8b0af59897
Update and restructure environments (#8496) 2024-10-22 17:55:11 +02:00
Mateusz Kwasniewski
1abc330a85
fix: enable nav sidebar for previous uis (#8508) 2024-10-22 15:31:25 +02:00
Gastón Fournier
15f55c7662
chore: Prometheus metrics refactor (#8484)
Migrate some prometheus metrics to use the new and sequential metric
updater
2024-10-22 15:11:57 +02:00
Mateusz Kwasniewski
d3294d58c2
chore: remove navigation sidebar leftover flag (#8504) 2024-10-22 10:08:27 +02:00
Tymoteusz Czech
2e970b0ff2
fix: don't allow . or .. in feature url (#8479)
We do some validation on flag names, but there's some cases that slip
through. These are some cases that we should handle better.

With `..` as a name, you can't go into the flag in Unleash and you can't
activate any environments because the it is interpreted as "go up a
level".
2024-10-21 16:35:17 +02:00
Mateusz Kwasniewski
a6c7a5fc90
feat: increase latest events in personal dashboard (#8491) 2024-10-21 12:30:50 +02:00
Gastón Fournier
a9f9be1efa
chore: add a class to handle aggreggation queries (#8446)
## About the changes
We have many aggregation queries that run on a schedule:
f63496d47f/src/lib/metrics.ts (L714-L719)

These staticCounters are usually doing db query aggregations that
traverse tables and we run all of them in parallel:
f63496d47f/src/lib/metrics.ts (L410-L412)

This can add strain to the db. This PR suggests a way of handling these
queries in a more structured way, allowing us to run them sequentially
(therefore spreading the load):
f02fe87835/src/lib/metrics-gauge.ts (L38-L40)

As an additional benefit, we get both the gauge definition and the
queries in a single place:
f02fe87835/src/lib/metrics.ts (L131-L141)

This PR only tackles 1 metric, and it only focuses on gauges to gather
initial feedback. The plan is to migrate these metrics and eventually
incorporate more types (e.g. counters)

---------

Co-authored-by: Nuno Góis <github@nunogois.com>
2024-10-18 11:11:22 +02:00
David Leek
d9646edcfc
feat: release plans nav menu item and icon suggestion (#8469) 2024-10-18 08:23:52 +02:00
Nuno Góis
3f8d4c3538
chore: update schemas related to Unleash AI chat (#8463)
https://linear.app/unleash/issue/2-2779/store-conversations-in-the-database

Updates schemas related to Unleash AI chat and renames the `chat` column
to `messages` to ensure everything aligns nicely.
2024-10-16 14:44:37 +01:00
Melinda Fekete
c580e762b3
Restructure features documentation (#8394) 2024-10-16 13:59:30 +02:00
David Leek
bb800e3537
fix: group and user has at least 1 project owner counter respects multirole project groups (#8453) 2024-10-16 12:47:00 +02:00
Nuno Góis
b9ea6641ff
chore: AI chats db migration (#8460)
https://linear.app/unleash/issue/2-2845/db-migration-ai-chats

Adds a new DB migration for creating a new `ai_chats` table, used on the
Unleash AI experiment.
2024-10-16 10:43:52 +01:00
gitar-bot[bot]
6d2b882eb8
[Gitar] Cleaning up stale flag: stripHeadersOnAPI with value true (#8457)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.co)
  
  ---
This automated PR was generated by [Gitar](https://gitar.co). View
[docs](https://gitar.co/docs).

Co-authored-by: Gitar <noreply@gitar.co>
2024-10-16 09:30:32 +02:00
David Leek
2cac903068
chore: releasePlans feature flag (#8458)
Adds the releasePlans feature flag
2024-10-16 09:00:58 +02:00
Gastón Fournier
7fb9308b3e
feat: ability to configure when users are considered inactive (#8454)
Give the ability to change when users are considered inactive via an
environment variable `USER_INACTIVITY_THRESHOLD_IN_DAYS` or
configuration option: `userInactivityThresholdInDays`. Default remains
180 days
2024-10-15 16:34:04 +02:00
Gastón Fournier
07469a427c
fix: same site api call with session cookie (#8435)
## About the changes
This fixes #8029. How to reproduce the issue is in the ticket.

The issue happens because when a web app is hosted in the same domain as
Unleash UI and the web app uses unleash SDK to make requests to Unleash,
the browser automatically includes the cookie in the request headers,
because:

- The request URL matches the cookie's Path attribute (which it does in
this case).
- The request is sent to the same domain (which it is, since both apps
are under the same domain).

And this is by design in the HTTP cookie specification:
https://datatracker.ietf.org/doc/html/rfc6265

This PR avoids overriding the API user with the session user if there's
already an API user in the request. It's an alternative to
https://github.com/Unleash/unleash/pull/8434

Closes #8029
2024-10-15 13:16:16 +02:00
Gastón Fournier
e22f6a04ba
chore: wrapTimer function types (#8428)
This gives us better types for our wrapTimer function.

Maybe the type `(args: any) => any` could also be improved

---------

Co-authored-by: Nuno Góis <nuno@getunleash.io>
2024-10-15 11:18:22 +02:00
Jaanus Sellin
39fb1b5db5
fix: archived flags without metrics do not count towards onboarding (#8443) 2024-10-14 14:09:57 +03:00
Jaanus Sellin
735e6f0b23
feat: now you can add env type to env order (#8442) 2024-10-14 13:26:38 +03:00
gitar-bot[bot]
d8ddb57818
chore: improve addon metrics usage 2024-10-14 09:20:27 +02:00
Jaanus Sellin
e72aa2871e
feat: order environment plausible events (#8427) 2024-10-11 11:05:33 +03:00
David Leek
24b9e4987b
chore:origin middleware flag cleanup (#8402) 2024-10-10 14:26:35 +02:00
Jaanus Sellin
3427fd745c
chore: debug lifecycle only when have new stages (#8418) 2024-10-10 14:28:11 +03:00
David Leek
b1cdde0c6b
chore: flag for webhook domain logging (#8413) 2024-10-10 13:23:52 +02:00
Nuno Góis
f78ce12860
chore: add unleashAI chat schemas (#8405)
https://linear.app/unleash/issue/2-2788/add-unleash-ai-chat-openapi-schemas

Adds OpenAPI schemas for the Unleash AI chat and respective messages.
2024-10-10 09:43:28 +01:00
Nuno Góis
d00873c357
chore: add OpenAI API key configuration (#8400)
https://linear.app/unleash/issue/2-2787/add-openai-api-key-to-our-configuration

Adds the OpenAI API key to our configuration and exposes a new
`unleashAIAvailable` boolean in our UI config to let our frontend know
that we have configured this. This can be used together with our flag to
decide whether we should enable our experiment for our users.
2024-10-10 09:43:14 +01:00
Jaanus Sellin
3a2206d228
feat: order environments service implementation (#8415)
This can be consumed in enterprise repo.
2024-10-10 11:33:21 +03:00
Nuno Góis
d032a91494
chore: add unleashAI feature flag (#8399)
https://linear.app/unleash/issue/2-2773/add-unleashai-feature-flag

Adds the `unleashAI` feature flag, the first step in the Unleash AI
experiment.
2024-10-09 14:10:58 +01:00
Jaanus Sellin
ca831f79e5
feat: order additional environments email templates (#8401)
Most of the HTML/styles retaken from existing templates.


![image](https://github.com/user-attachments/assets/5244c8d2-fe80-474a-9e65-a0f5ae4d44c2)
2024-10-09 15:15:27 +03:00
Thomas Heartman
f23ba70bb4
feat: add timestamps to project events (#8389)
This PR adds timestamps to project events and displays them in the
"latest events" box in the project details view.

It also changes the font weight of events to be only normal.


![image](https://github.com/user-attachments/assets/69ee4052-fe96-4fc9-ae45-0818acb0570a)
2024-10-09 09:32:58 +02:00
Gastón Fournier
cf5e492dab
chore: add timers to count queries (#8393)
## About the changes
These might be some heavy queries, adding timers to them to validate
that assumption and get some insights
2024-10-08 15:41:00 +02:00
Jaanus Sellin
8f4454039a
feat: start capturing onboarded status also from register endpoint (#8386)
1. Remove all customer intervals
2. Start capturing onboarded status also from register endpoint
2024-10-08 12:40:33 +03:00
Jaanus Sellin
93883b3767
chore: update debugging lifecycle format (#8371) 2024-10-07 14:54:53 +03:00
Christopher Kolstad
942555b993
fix: use ip-address for remote-strategy (#8380)
Removed direct dependency on ip in favor of maintained `ip-address`.

Copied from unleash-client-node.
2024-10-07 13:51:03 +02:00
Thomas Heartman
2905b560bd
fix: no owners listed in personal dashboard for default project (#8373)
This PR fixes a bug where the default project would have no listed
owners. The issue was that the default project has no user owners by
default, so we didn't get a result back when looking for user owners.
Now we check whether we have any owners for that project, and if we
don't, then we return the system user as an owner instead.

This also fixes an issue for the default project where you have no roles
(because by default, you don't) by updating the schema to allow an empty
list.
2024-10-07 10:52:11 +02:00
Thomas Heartman
2ac9c701c3
fix: return 404 if the project doesn't exist (#8362)
This change adds a check for whether the project exists in the
database before trying to fetch data for it. If it doesn't exist,
you'll get a 404.
2024-10-04 15:43:02 +02:00
Jaanus Sellin
1875c9b6d1
feat: add flag to purchase additional environments (#8366) 2024-10-04 15:07:14 +03:00
Thomas Heartman
89b619deba
openapi: small adjustments to dashboard schemas (#8363)
This PR contains a number of small updates to the dashboard schemas,
including rewording descriptions, changing numbers to integers, setting
minimum values.
2024-10-04 12:52:14 +02:00
Jaanus Sellin
e8e005daa4
feat: archived features will be included in onboarding (#8350)
Now when you are finished onboarding and you archive feature, you will
not restart onboarding.
2024-10-03 13:01:45 +03:00
Mateusz Kwasniewski
10dffcd232
feat: health score components in personal dashboard (#8348) 2024-10-03 10:21:27 +02:00
Jaanus Sellin
9a64dfbfbe
feat: add logging for lifecycle prom metrics (#8341) 2024-10-02 15:49:15 +03:00
Gastón Fournier
6aef7ba84c
chore: remove unused flag (#8340)
Code affected by this flag was removed long time ago
2024-10-02 14:46:14 +02:00
Thomas Heartman
aa28b78c30
chore: remove the projects? Property from ICreateGroupModel (#8246)
This property does not seem to be used anywhere, so we can remove it.

Can't find any references in code here or in enterprise. Let's try it
and see if it breaks.
2024-10-02 11:04:44 +02:00
Thomas Heartman
5f7e21f1e7
chore: test that owners and roles are returned (#8319)
Test that owners and roles are returned in the personal dashboard
project details response as expected.
2024-10-02 07:50:38 +00:00
Thomas Heartman
4c4b4aa922
refactor: use promise.all instead of sequential awaited calls (#8316)
This PR follows up on a comment made in
https://github.com/Unleash/unleash/pull/8314 and groups sequential
awaited calls into a single Promise.all instead.
2024-10-02 07:49:53 +00:00