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

10285 Commits

Author SHA1 Message Date
Jaanus Sellin
2643ac1356
feat: add CR id to plausible events (#6035)
Added conflict count to CR metrics and CR id.

Something to think about:
There was idea that we can aggregate this data based on CR id, but CR id
is just a number from 0 to x. So it will not be unique across instances.

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-01-30 10:38:39 +02:00
Tymoteusz Czech
46fb40ca08
fix: dashboard layout (#6063)
Align widgets properly on main screen. Responsive view in next PRs
2024-01-30 09:00:06 +01:00
David Leek
9d2c65c9c0
chore: events created by userid migration (#6027)
## About the changes

Schedules a best-effort task setting the value of
events.created_by_user_id based on what is found in the created_by
column and if it's capable of resolving that to a userid/a system id.
The process is executed in the events-store, it takes a chunk of events
that haven't been processed yet, attempts to join users and api_tokens
tables on created_by = username/email, loops through and tries to figure
out an id to set. Then updates the record.

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2024-01-30 08:22:53 +01:00
Thomas Heartman
6f4f8661c7
docs: update nav bar (#6045)
Update the Unleash docs navbar according to the new spec:

Changing "estimated time burden" to "estimated time" (or "estimated
reading time"), is just a matter of changing the text in the files.
There's nothing special making it say burden other than plain text. That
can be done in a follow-up PR.

The new nav bar includes the Unleash academy and certification dropdowns
as well as the docs and quickstart items. On smaller screen sizes
(between 997 and 1150 px), we hide the word "Unleash" from "Unleash
academy" and "Unleash certification".

The narrowest nav bar:

![image](https://github.com/Unleash/unleash/assets/17786332/13d05b0b-8668-4ff0-b06e-5c3073f0dda8)

When Unleash pops back in: 

![image](https://github.com/Unleash/unleash/assets/17786332/191ae3fe-5fca-4464-b79a-db6995e600c9)

---------

Co-authored-by: markunl <mark@getunleash.io>
2024-01-29 13:30:18 -05:00
Nnenna Ndukwe
1d5d7ee57d
fix: updating links across the React docs (#6054)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

- Simplified wording
- More descriptive ALT text for images
- Included YouTube tutorial link
- Improve code indentation in some code blocks

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

YouTube link at the top of a tutorial or near the bottom?

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-01-29 12:33:41 -05:00
David Leek
c08ac86c5f
chore: filter on token username and user id in SQL instead (#6061)
## About the changes

Change the sorting of features to migrate created_by_user_id for, and
filter out unresolvable feature/users

Query tested manually in enterprise
2024-01-29 15:14:44 +01:00
Mateusz Kwasniewski
8a7e65eaa6
refactor: cleanup fix for persistent set (#6060) 2024-01-29 12:33:01 +01:00
Nuno Góis
c1046079dd
chore: actions modal form (#6057)
https://linear.app/unleash/issue/2-1882/ui-add-actions-modal-and-form

Adds actions modal and form, allowing users to create and edit actions.

The main thing that is missing is adding the remaining fields, which
will be included in a later PR.
2024-01-29 11:15:29 +00:00
Nuno Góis
7da9232516
refactor: add temporary ts-expect-error to setGlobalStore in setHiddenEnvironments 2024-01-29 10:26:00 +00:00
Thomas Heartman
cdb42b3f7b
chore: remove drew as a codeowner for docs (#6056)
Now that Drew isn't at Unleash anymore, he probably doesn't want to get
review requests for docs stuff anymore 💁
2024-01-29 18:10:33 +09:00
David Leek
bbebd293e5
chore: add a migration that removes incorrectly set sysuserid (#6032)
## About the changes

Resets created_by_user_id on events incorrectly marked as -1337 when an actual user has been set in created_by column, to clean up after a bug
2024-01-29 09:16:18 +01:00
David Leek
e652af49af
chore: default the data migration flag for createdbyuserid to false (#6048)
## About the changes

Sets data migration of features and events created_by_user_id to
disabled by default

Map to promise and await all in created by user id migration for features
2024-01-29 08:07:33 +01:00
Mateusz Kwasniewski
ce219f1b74
fix: hidden envs (#6050) 2024-01-26 17:03:10 +01:00
andreas-unleash
4a2d1b0364
fix: return 400 when enabling env of archived toggle (#6049)
Creates a new ArchivedFeatureError.
Throw this error when trying to toggle a feature environment for an
archived feature.

Closes
https://github.com/orgs/Unleash/projects/8/views/1?pane=issue&itemId=51242922

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-01-26 16:02:17 +02:00
Mateusz Kwasniewski
a1fa5a4212
feat: flag trends db migration (#6044) 2024-01-26 14:37:15 +01:00
Tymoteusz Czech
61c6583e24
Feat/dashboard chart tooltip (#6038)
Initial version of new chart tooltip
2024-01-26 14:33:11 +01:00
Fredrik Strand Oseberg
4a025a4b4b
feat: flag widget (#6047)
This PR adds the flag widget:

<img width="333" alt="Skjermbilde 2024-01-26 kl 14 16 19"
src="https://github.com/Unleash/unleash/assets/16081982/57b8c312-fcd5-4a3f-85f7-76514c671912">
2024-01-26 14:22:16 +01:00
Mateusz Kwasniewski
9b281ca508
feat: stale flags count per project (#6043) 2024-01-26 12:04:43 +01:00
Nuno Góis
6ee4d2724e
fix: actions table UI improvements (#6042)
Includes some small fixes and improvements to the actions table UI:
 - Fix webhook icon not properly loading
 - Make actions execution param names bold in the tooltip
 - Make filters param names bold in the tooltip
2024-01-26 09:52:19 +00:00
Christopher Kolstad
32dd377c3e
fix: Use knex whereLike instead of whereRaw to fix escaping (#6041)
This escape with `??` double escaped the LIKE query causing no results.
This updates to using whereLike, which does the correct escaping for
string query.
2024-01-26 10:44:53 +01:00
Nuno Góis
32484460ef
chore: project actions table (#6039)
https://linear.app/unleash/issue/2-1877/ui-add-actions-table

Implements the new project actions table.


![image](https://github.com/Unleash/unleash/assets/14320932/2ce96669-4b8f-46cd-9a87-8b14f0682694)


![image](https://github.com/Unleash/unleash/assets/14320932/d73327f2-1e1a-4d57-8ef8-1f4518c4b5d9)


![image](https://github.com/Unleash/unleash/assets/14320932/27b9ffab-4fff-4fdf-808f-b778987fa198)
2024-01-26 08:20:30 +00:00
Tymoteusz Czech
00b3cbaa8b
Dashboard API hook (#5990)
Data fetching for dashboard

https://linear.app/unleash/issue/1-1969/dashboard-users-chart-api-hook
2024-01-26 09:03:12 +01:00
Fredrik Strand Oseberg
9ac1c88bd4
feat: new user widget (#6037)
Preliminary code for executive dashboard user widget
2024-01-25 14:43:59 +01:00
David Leek
c7f13aec0b
chore: implement created_by_user_id in features (#5994)
## About the changes

Adds a scheduled task that every 5 seconds updates 500 entries in the
features table setting `created_by_user_id`.
It does this by looking at the related event, checks created_by and
joins users table for match on username or email, and joins api_tokens
table on username matches. Then picks either a users id if set, or uses
-42 (admin token user)
2024-01-25 13:09:30 +01:00
Mateusz Kwasniewski
8ab4aa3d0e
feat: user trends migration (#6030) 2024-01-25 12:56:29 +01:00
David Leek
0045fcbcdf
chore: replace systemUser -1 with new -1337 system user (#5999)
## About the changes
This PR replaces the old systemUser -1 in user-service.ts with the new
SYSTEM_USER -1337 and adds a migration to move events created_by = -1 to
-1337


## Discussion points
Does it make sense to do both of these things? Or should we skip the
migration? How would this behave in a large system with hundreds of
thousands of events, should this be split up?
2024-01-25 11:19:39 +01:00
andreas-unleash
8f3275ee40
chore: change users image_url column to text (#6031)
Change the image_url column to text

Closes #
https://github.com/orgs/Unleash/projects/8/views/1?pane=issue&itemId=51021534

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-01-25 11:40:18 +02:00
andreas-unleash
89bea0d532
fix: clone variants (featureEnv and strategy) when cloning an env (#6026)
Fixes 2 bugs
- Strategy variants
- Feature env variants 
not being cloned when cloning an environment

Closes #
[SR-350](https://linear.app/unleash/issue/SR-350/cloning-environment-does-not-clone-variants-or-strategy-variants)

Manual test verifies the fix
<img width="1659" alt="Screenshot 2024-01-24 at 16 48 28"
src="https://github.com/Unleash/unleash/assets/104830839/ba9fc9b8-e792-47bb-b6e8-660350384ea8">
<img width="1408" alt="Screenshot 2024-01-24 at 16 48 10"
src="https://github.com/Unleash/unleash/assets/104830839/1e2d5287-35d0-42d2-9ab2-8caa313bd5a8">

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-01-25 10:53:43 +02:00
Mateusz Kwasniewski
41351a694e
refactor: Instance stats service composition root (#6029) 2024-01-25 09:11:26 +01:00
Jaanus Sellin
b0ecfd4d34
feat: add plausible change-requests-conflicts (#6024) 2024-01-24 21:46:08 +02:00
Nnenna Ndukwe
936fa44ec5
Shorter nav names for tutorials while maintaining SEO titles (#6028)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

Let's update our tutorial titles in the left navigation menu so it's
shorter and simpler.
This will _not_ change the metadata and doc titles when you click on
them. Only the label in the nav.

BEFORE
![Screenshot 2024-01-24 at 9 52
17 AM](https://github.com/Unleash/unleash/assets/22972707/283b22c5-c317-4140-8478-67965d004ef1)

AFTER
![Screenshot 2024-01-24 at 9 47
37 AM](https://github.com/Unleash/unleash/assets/22972707/04c58f24-1e1f-4f83-b1ff-1eeba670a092)


<!-- Does it close an issue? Multiple? -->
Closes #

<!-- (For internal contributors): Does it relate to an issue on public
roadmap? -->
<!--
Relates to [roadmap](https://github.com/orgs/Unleash/projects/10) item:
#
-->

### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->
2024-01-24 10:14:50 -05:00
Christopher Kolstad
17d826ddf4
task: Add banner encouraging edge upgrade (#6018)
Only triggers if there is any rows in client instances that have

    sdk_version: unleash-edge with version < 17.0.0

The function that checks this memoizes the check for 10 minutes to avoid
scanning the client instances table too often.
2024-01-24 14:22:48 +00:00
Christopher Kolstad
3acdfc2cf4
task: Make /edge/metrics toggleable by toggle (#6003)
Previously we used a killswitch and returned 404 if the feature was
enabled. This flips that to a default disabled toggle, that has to be
turned on to handle old Edge (pre 17.0.0) posting bulk metrics
2024-01-24 14:09:03 +01:00
Nnenna Ndukwe
1f7c7940b4
Feature Flags with Python Tutorial (#6016)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->

A new tutorial to get developers to implement feature flags into a
Python Flask app.
We have steps that guide them through the process using a simple
full-stack survey app.

Based off of a reviewed [Google Doc
here](https://docs.google.com/document/d/1YlG-TyQcMEyUrMjiWlYrd-J5DXog5ErbvSKAyuzKAnU/edit#heading=h.ryvmv14764i3)

The tutorial can go live in the docs nav in a new Python section, where
the Python examples will follow.


### Important files
<!-- PRs can contain a lot of changes, but not all changes are equally
important. Where should a reviewer start looking to get an overview of
the changes? Are any files particularly important? -->


`website/docs/feature-flag-tutorials/python/implementing-feature-flags.md`


## Discussion points
<!-- Anything about the PR you'd like to discuss before it gets merged?
Got any questions or doubts? -->

---------

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
2024-01-24 08:00:33 -05:00
Jaanus Sellin
e4ca8a3e6c
feat: track search bar events (#6021)
Adding tracking for 2 views, when users use the new search. 

For features view and project view.
2024-01-24 14:23:23 +02:00
Nuno Góis
331033408c
fix: flag resolver get variant (#6020)
https://linear.app/unleash/issue/2-1880/fix-flag-resolver-getvariant-behavior

Fixes the flag resolver `getVariant` behavior when there's a variant
object set in `experimental` - The flag resolver should call the
external resolver `getVariant` when not overridden to be true, even if
set as variant object in `experimental`.

Related: https://github.com/Unleash/unleash/pull/3808
2024-01-24 11:53:04 +00:00
Gastón Fournier
cee2500a4d
feat(2-1879): add enabled to action sets (#6023)
## About the changes
Adds enabled to action sets table
2024-01-24 12:52:04 +01:00
Nuno Góis
5d1d428746
chore: project actions tab (#6009)
https://linear.app/unleash/issue/2-1858/add-new-actions-tab-to-project-settings

Adds the new actions tab to project settings, hidden behind the
`automatedActions` feature flag.


![image](https://github.com/Unleash/unleash/assets/14320932/594ed7e0-6e1a-464e-b649-bee368e14aea)
2024-01-24 10:05:04 +00:00
Maximilian Edison
e087f4226f
Docs: Getting Started Self-Hosting unleash (#6019)
## About the changes

put UNLEASH_DEFAULT_ADMIN_PASSWORD inside ``
2024-01-24 13:06:01 +04:00
Thomas Heartman
01318b11ea
fix: show the updated value instead of the snapshot value (#5989)
This PR fixes a bug in the displayed value of the conflict list so that
it shows the value it would update to instead of the snapshot value.

In doing so, it updates the logic of the algorithm to:

1. if the snapshot value and the current value are the same, it's not a
conflict (it's an intended change)
2. If the snapshot value differs from the current value, it is a
conflict if and only if the value in the change differs from the current
value. Otherwise, it's not a conflict.

The new test cases are:
- it shows a diff for a property if the snapshot and live version differ
for that property and the changed value is different from the live
version
- it does not show a diff for a property if the live version and the
change have the same value, even if the snapshot differs from the live
version
- it does not show a diff for a property if the snapshot and the live
version are the same
2024-01-24 12:39:41 +04:00
Nuno Góis
13a9b1bc13
fix: project settings title (#6011)
Small fix to the project settings title, correcting it and making it
consistent.
2024-01-24 08:38:13 +00:00
Mateusz Kwasniewski
e3fb3fd0be
fix: variant stickiness fix node client (#6017) 2024-01-24 09:28:06 +01:00
Nuno Góis
7413a1ee1a
chore: add support for project and environment in PermissionGuard (#6008)
I noticed some manual `hasAccess` usages in permission guards due to the
fact that `PermissionGuard` does not accept `project` and `environment`.
This PR adds this support to `PermissionGuard` so we can adapt these
`hasAccess` checks to use it instead, adding consistency and cleaning
things up.

This PR does not include these adaptations however, it only adds the
optional properties to the component. We can address these at a later
point.
2024-01-24 08:20:38 +00:00
Tymoteusz Czech
68eb3dec07
fix: upgrade unleash-client to v5.3.0 (#5800) 2024-01-24 09:12:07 +01:00
Ivar Conradi Østhus
3957abf0f6
docs: Minor typos (#6014)
Some minor typos in our docs.
2024-01-23 20:19:06 +01:00
Nicholas Haley
ab24264df9
docs: spelling and grammar (#6007)
<!-- Thanks for creating a PR! To make it easier for reviewers and
everyone else to understand what your changes relate to, please add some
relevant content to the headings below. Feel free to ignore or delete
sections that you don't think are relevant. Thank you! ❤️ -->

## About the changes
<!-- Describe the changes introduced. What are they and why are they
being introduced? Feel free to also add screenshots or steps to view the
changes if they're visual. -->
This is a demo that uses [Floe](https://www.floe.dev/) to review the
`how-to` directory using the `spelling-and-grammar` rule.

You can read more about the tool here: https://www.floe.dev/docs
2024-01-23 19:52:10 +01:00
Mark Fulton
e9d49d68fd
Docs/license keys (#5959)
New docs page for the beta license keys feature introduced in Unleash
5.8 for self-hosted enterprise users.

---------

Co-authored-by: Ivar Conradi Østhus <ivar@getunleash.io>
2024-01-23 12:17:10 -05:00
Gastón Fournier
9f550331ce
chore: validate all tables have primary keys (#6005)
## About the changes
This is a helpful reminder to have primary keys in all our tables.

Related to [#4303](https://github.com/Unleash/unleash/issues/4303)
2024-01-23 16:38:16 +01:00
Gastón Fournier
82ac5a47ad
chore: This helps output the migrations being applied (#6004)
## About the changes
This outputs to console.log but should be indexable:

![image](https://github.com/Unleash/unleash/assets/455064/cb696936-7060-447d-b22d-ff62b4dbcbc3)
2024-01-23 16:01:36 +01:00
Mateusz Kwasniewski
156ba39b42
fix: strategy screen re-rendering table bug (#6006) 2024-01-23 15:49:13 +01:00