1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

6975 Commits

Author SHA1 Message Date
renovate[bot]
408b81690d
chore(deps): update dependency @vitejs/plugin-react to v3 (#2665)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@vitejs/plugin-react](https://togithub.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#readme)
([source](https://togithub.com/vitejs/vite-plugin-react)) | [`2.2.0` ->
`3.0.0`](https://renovatebot.com/diffs/npm/@vitejs%2fplugin-react/2.2.0/3.0.0)
|
[![age](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/3.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/3.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/3.0.0/compatibility-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@vitejs%2fplugin-react/3.0.0/confidence-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>vitejs/vite-plugin-react</summary>

###
[`v3.0.0`](https://togithub.com/vitejs/vite-plugin-react/blob/HEAD/packages/plugin-react/CHANGELOG.md#&#8203;300-2022-12-09)

[Compare
Source](972b8ddca7...0aaf2e56de)

- chore: update vite to ^4.0.0
([#&#8203;57](https://togithub.com/vitejs/vite-plugin-react/issues/57))
([941b20d](https://togithub.com/vitejs/vite-plugin-react/commit/941b20d)),
closes
[#&#8203;57](https://togithub.com/vitejs/vite-plugin-react/issues/57)
- chore(deps): update rollup
([#&#8203;56](https://togithub.com/vitejs/vite-plugin-react/issues/56))
([af25ec7](https://togithub.com/vitejs/vite-plugin-react/commit/af25ec7)),
closes
[#&#8203;56](https://togithub.com/vitejs/vite-plugin-react/issues/56)
- chore!: drop ast check for refresh boundary
([#&#8203;43](https://togithub.com/vitejs/vite-plugin-react/issues/43))
([e43bd76](https://togithub.com/vitejs/vite-plugin-react/commit/e43bd76)),
closes
[#&#8203;43](https://togithub.com/vitejs/vite-plugin-react/issues/43)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC41NC4wIiwidXBkYXRlZEluVmVyIjoiMzQuNjIuMSJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-12-27 09:55:20 +01:00
Nuno Góis
2d16730cc2
feat: adds an optional dialog and markdown support (#2728)
Adds the option of showing a dialog and adds markdown support to it,
could be useful to show changelogs inside Unleash in the future.


![image](https://user-images.githubusercontent.com/14320932/209147164-ed19c9ab-fae5-452b-9aab-075d058ba10e.png)
2022-12-22 15:47:42 +00:00
Nuno Góis
aaa96f71cb
feat: message banner (#2726)
Related to:
https://linear.app/unleash/issue/2-511/exploration-build-data-for-the-possibility-of-showing-an-alert-to-the
Namely:
https://unleash-internal.slack.com/archives/C046LV85N3C/p1671443897386729

The idea is to have a general message banner that can be controlled
through a feature flag in Unleash to display announcements, warnings,
informations, etc.

Currently using mock feature flags, but the idea is to bind this to a
feature flag we can manage in our Unleash instance, and use its payload
to provide information to end users whenever we want.

Co-authored-by: Gastón Fournier <gaston@getunleash.ai>
2022-12-22 15:16:51 +00:00
sjaanus
e533b44c5b
Adds tracking to maintenance feature (#2723)
Adds tracking with plausible to maintenance feature
2022-12-21 16:16:15 +02:00
Christopher Kolstad
5b66346e56
fixes 2-456: Preserve all data from strategy import (#2720)
## What
Previously when importing strategies we've used the same data type we've
used for creating strategies (the minimal, a name, an optional
description, optional parameters and an optional editable column). This
meant that exporting strategies and then importing them would reactivate
deprecated strategies. This PR changes to allow the import to preserve
all the data coming in the export file.

## Tests
Added four new tests, two new unit tests using our fake stores and two
new e2e tests. Interestingly the ones in the fake store ran green before
this change as well, probably because we just insert the parsed json
object in the fake store, whereas the real store actually converts the
object from camelCasing to the postgresql snake_casing standard.

## Discussion points:
### Mismatch between fake and real stores
This is inevitable since storing things in javascript arrays vs saving
in a real database will have some differences, but this again shows the
value of our e2e tests.

### Invariants
Should we see if we can add some invariants to our import/export so that
we can write some proptests for it? One candidate is commutativity of
import/export. On a fresh database importing and then exporting should
yield the same file that was imported provided all flags are turned on.
Candidate for Q1 improvement of import/export.
2022-12-21 13:33:41 +01:00
sjaanus
be045dc13a
Remove favorites feature flag (#2722) 2022-12-21 12:03:06 +00:00
sjaanus
a0619e963d
Maintenance mode for users (#2716) 2022-12-21 13:23:44 +02:00
Nuno Góis
1ef84da688
fix: set a more generous maxWidth in access timeago cells (#2714)
https://unleash-internal.slack.com/archives/C046LV6HH6W/p1671533789519689
2022-12-20 22:14:29 +01:00
Nuno Góis
7ce5b3de64
refactor: flag resolver should use stricter types (#2571)
Adding stricter types to `FlagResolver` can possibly help improve our DX
- Help us prevent errors like typos, guide us to correctly add a flag
when needed, and warn us of stray checks whenever we do a clean up at a
later stage.
2022-12-20 15:10:06 +00:00
Gastón Fournier
4b519ead4f
perf: Simplify queries to prometheus (#2706)
## About the changes
This PR improves our queries to Prometheus (instead of making multiple queries do only one) and improves the UI and the code. 

The reports aggregate all HTTP methods (GET, POST, PUT, DELETE, OPTIONS, HEAD and PATCH) without distinction under the same "endpoint" (a relative path inside unleash up to a certain depth)

Co-authored-by: Nuno Góis <nuno@getunleash.ai>
2022-12-19 17:06:59 +01:00
Tymoteusz Czech
2c15841af4
fix: metrics one hour select label (#2712) 2022-12-19 16:27:21 +01:00
sjaanus
025fdeea1a
Make build badge work correctly (#2710) 2022-12-19 11:23:07 +02:00
sjaanus
2d5455d203
Maintenance mode middleware (#2707) 2022-12-19 09:01:04 +02:00
Thomas Heartman
ff9bc1d10c
Docs: fix typo / lexical illusion "the the" -> "to the" 2022-12-18 23:06:35 +01:00
Nuno Góis
d2d5629a36
Feat lazy loading network (#2709)
Adds lazy loading to the network routes, so we end up with smaller
chunks in the build.

Also adds a `start:prod` script that can prove useful to test the chunk
loading behaviour locally.
2022-12-16 18:09:24 +00:00
Nuno Góis
a3ac96f763
Feat network overview (#2708)
https://linear.app/unleash/issue/2-512/exploration-network-overview-represented-as-a-flow-chart

<img width="1307" alt="image"
src="https://user-images.githubusercontent.com/14320932/208110067-294a0b91-d52e-49d1-9024-fa5e8530e2d8.png">
2022-12-16 14:12:36 +00:00
Gastón Fournier
2979f21631
feat: expose number of registered applications metric (#2692)
## About the changes
This metric will expose an aggregated view of how many client
applications are registered in Unleash. Since applications are ephemeral
we are exposing this metric in different time windows based on when the
application was last seen.

The caveat is that we issue a database query for each new range we want
to add. Hopefully, this should not be a problem because:
a) the amount of ranges we'd expose is small and unlikely to grow
b) this is currently updated at startup time and even if we update it on
a scheduled basis the refresh rate will be rather sparse

## Sample data
This is how metrics will look like
```
# HELP client_apps_total Number of registered client apps aggregated by range by last seen
# TYPE client_apps_total gauge
client_apps_total{range="allTime"} 3
client_apps_total{range="30d"} 3
client_apps_total{range="7d"} 2
```
2022-12-16 11:16:51 +00:00
Christopher Kolstad
eafba10cac
feature: add query support to features endpoint (#2693)
## About the changes
The deprecated /api/admin/features endpoint supported querying with tag
and namePrefix parameters.

This PR adds this functionality to
/api/admin/projects/<project>/features as well, allowing to replicate
queries that used to work.

Closes #2306

### Important files
src/lib/db/feature-strategy-store.ts
src/test/e2e/stores/feature-strategies-store.e2e.test.ts

## Discussion points
I'm extending our query parameters support for
/api/admin/projects/<projectId>/features endpoint. This will be
reflected in our open-api spec, so I also made an
adminFeaturesQuerySchema for this.

Also, very open for something similar to what we did for the modifyQuery
for the archived parameter, but couldn't come up with a good way to
support subselects using the query builder, it just ended up blowing the
stack. If anyone has a suggestion, I'm all ears.

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2022-12-16 12:05:18 +01:00
Nuno Góis
1d1219a055
Use new useConditionallyHiddenColumns hook (#2695)
https://linear.app/unleash/issue/2-515/adapt-tables-to-use-the-new-useconditionallyhiddencolumns-hook

Uses the new `useConditionallyHiddenColumns` hook, like mentioned here:
https://github.com/Unleash/unleash/pull/2691
Also includes small fixes for things I caught along the way. See
comments below.
2022-12-16 10:46:04 +01:00
Simon Hornby
e437b61753
docs: update group docs to reflect that users is not optional (#2667)
The reference documentation for groups is incorrect, groups always
require a list of users

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2022-12-16 10:45:15 +01:00
sjaanus
d42e90544f
Maintenance mode UI (#2704) 2022-12-15 16:07:22 +02:00
GitHub Actions Bot
5bef9bbfdd 4.19.1 2022-12-15 12:46:12 +00:00
Mateusz Kwasniewski
f4480d516b
remove change request flag (#2703) 2022-12-15 13:43:06 +01:00
GitHub Actions Bot
97cf3cd418 4.19.0 2022-12-15 12:03:45 +00:00
Nuno Góis
90f0d665f9
fix: disable networkView for dev, fail more gracefully (#2701)
Disables networkView for dev for now. Attempts to fail more gracefully
both on the service and front-end.
2022-12-15 10:12:02 +00:00
Thomas Heartman
dc8a369b7b
Docs: update availability notice for sso keycloak group sync
## What

This change updates the availability notice in the SSO keycloak setup
guide.

## Why

Because the notice still said that it's an "upcoming" feature, but it
was released in 4.18.
2022-12-15 11:00:36 +01:00
Mateusz Kwasniewski
2e615cdd35
refresh change request, add conflict margin, set time ago (#2700) 2022-12-15 10:49:16 +01:00
Christopher Kolstad
23094b016e
feat: first draft of chart for instance traffic in frontend (#2670)
## What
We've already added the backend for this. This is the initial work for
drawing a chart for instance traffic in the frontend. It requires the environment variable `PROMETHEUS_API` set to a valid prometheus-query-language (promql) supported backend, such as Prometheus itself or Victoria Metrics. Besides, at the moment we're hiding this functionality behind the flag `UNLEASH_EXPERIMENTAL_NETWORK_VIEW` which has to be set to true

Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai>
Co-authored-by: Gastón Fournier <gaston@getunleash.ai>
2022-12-15 08:47:07 +00:00
Ivar Conradi Østhus
8e5ca352c3
fix: allow publish-new-version action to run from branch (#2698)
We cannot hard code the branch to be "main" if we want to allow the
release script to also run from branch (e.g. 4.18 maintenance branch)
2022-12-15 09:25:44 +01:00
GitHub Actions Bot
e716ddc0ee 4.19.0-beta.2 2022-12-15 07:43:43 +00:00
Ivar Conradi Østhus
34c12c8234
fix: adjust db-pool for test to use max=4 2022-12-14 20:25:14 +01:00
Ivar Conradi Østhus
e01167676c
fix: background frontend settings should not crash tests 2022-12-14 20:24:47 +01:00
Ivar Conradi Østhus
e4035d37d4
fix: adjust db-pool for test to use max=3 2022-12-14 19:53:26 +01:00
Ivar Conradi Østhus
2223cace41
fix: adjust db-pool a bit 2022-12-14 19:42:01 +01:00
Ivar Conradi Østhus
09c87c755f
Fix/remove settings cache (#2694)
In this PR we remove the general SettingService cache, as it will not
work across multiple horizontal unleash instances, events are not
published across.

We also fix the CORS origin to: 
- Access-Control-Allow-Origin set to "*" if no Origin is configured
- Access-Control-Allow-Origin set to "*" if any Origin is configured to
"*"
- - Access-Control-Allow-Origin set to array and have the "cors"
middleware to return an exact match on the user provided Origin.

Co-authored-by: Fredrik Oseberg <fredrik.no@gmail.com>
2022-12-14 17:35:22 +01:00
Nuno Góis
db7b39af2d
fix: upgrades useHiddenColumns hook to fix related issues (#2691)
https://linear.app/unleash/issue/2-514/fix-issues-with-conditionally-hidden-table-columns

This upgrades the old `useHiddenColumns` to a new
`useConditionallyHiddenColumns`. This implementation covers some issues
and edge cases, and should hopefully be the standard way of achieving
responsive visibility for table columns from now on.

Some of these issues included incorrectly showing/hiding table columns,
whether when resizing the window or at page load, even when the proper
conditions were met to toggle their visibility.

This PR adapts the tables that were already using `useHiddenColumns` to
use the new approach.
I'll create a new PR after this one to adapt our other existing tables
to use this new approach as well.
2022-12-14 15:22:38 +00:00
Nuno Góis
fe2f2f5705
Update dialogue design (#2342)
https://linear.app/unleash/issue/2-509/update-dialogues-to-match-new-designs

Update dialogues to match the look on the new designs:

![image](https://user-images.githubusercontent.com/14320932/200525669-35525761-1c3e-4c60-94a7-e21b1de99ad7.png)
2022-12-14 15:16:58 +00:00
Thomas Heartman
160b9a0604
docs: small fixes (#2688)
## What

This PR contains two small doc updates/fixes:

1. Update the availability notice on SSO syncing to indicate that it has
been released.
2. Add a note to the Import API description that importing environments
will make Unleash delete API keys belonging to those environments.

## Why

1. To keep the docs up to date.
2. Because this behavior surprised (and rightly so, I'd say) a user, who
then suddenly had all their SDKs unable to connect.

Co-authored-by: Nuno Góis <github@nunogois.com>
2022-12-14 15:26:41 +01:00
Mateusz Kwasniewski
a54d53a117
added contraints checking in change request permissions (#2690) 2022-12-14 13:00:51 +01:00
GitHub Actions Bot
3549be0251 4.19.0-beta.1 2022-12-14 09:03:49 +00:00
Mateusz Kwasniewski
cb0398ca63
loosen permissions for change requests (#2682) 2022-12-14 10:00:14 +01:00
Nuno Góis
eb433185a1
fix: remove tooltip from favorites cell, some refactoring (#2687)
https://linear.app/unleash/issue/2-510/favorite-cell-tooltips-is-buggy-when-pinned-remove-tooltips

Tooltips were buggy when using the pinned feature, so I aligned with
@NicolaeUnleash and decided to remove them for now:
<img width="407" alt="image"
src="https://user-images.githubusercontent.com/14320932/207380515-476a4bec-c1c0-43af-adb8-f7001ae75e9c.png">

Also includes a slight refactor on this component.
2022-12-14 08:51:41 +00:00
Nuno Góis
212083b5ed
fix: favorite tooltip topleft flash (#2686)
Fixes an issue where the tooltip would flash on the top left when going
through the rows.
2022-12-13 14:06:25 +00:00
Nuno Góis
4afd505164
feat: make favorites a global preference (#2685)
https://linear.app/unleash/issue/2-508/make-pinned-favorites-a-global-preference

Also introduces a `useGlobalLocalStorage` hook where system-wide
preferences that are stored in LocalStorage can be maintained.
2022-12-13 13:20:43 +00:00
Nuno Góis
e05d924663
fix: misc UI/UX fixes, mostly related with favorites (#2683)
https://linear.app/unleash/issue/2-504/misc-frontend-related-fixes-mostly-related-with-favorites
2022-12-13 13:19:21 +00:00
Nuno Góis
a8cd3166d1
fix: adds bottom margin to SSO sync info box (#2674)
https://linear.app/unleash/issue/2-495/group-form-small-ui-fix
2022-12-13 14:01:53 +01:00
sjaanus
419640fb2b
Add unique trackable URLs for Pro/Enterprise feature lead generation (#2684)
Add unique trackable URLs for Pro/Enterprise feature lead generation
2022-12-13 14:35:07 +02:00
sjaanus
fb06fa9f46
Remove full width access tab (#2679)
Remove full width access tab
2022-12-13 13:41:40 +02:00
Gastón Fournier
025c8bd7d9
style: remove empty file (#2680)
This file is not needed and was probably committed by
accident.
2022-12-13 10:59:53 +00:00
GitHub Actions Bot
8aeba08e9f 4.19.0-beta.0 2022-12-13 08:26:11 +00:00