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

246 Commits

Author SHA1 Message Date
Tymoteusz Czech
0d5f33f8ba
Feat/instance health (#4586)
Hackathon

---------

Co-authored-by: chriswk <chriswk@getunleash.io>
2023-08-30 12:51:46 +00:00
Fredrik Strand Oseberg
3b2d6a4cbf
feat: DORA metrics lead time to production (#4589)
* Adds initial support for estimating dora metric lead time for changes
per feature toggle
2023-08-30 14:39:43 +02:00
Gastón Fournier
ae18c3d6c1
chore: Remove duplicated tags (#4580)
## About the changes
At https://github.com/Unleash/unleash/pull/4432 we've introduced the
same tags twice which causes issues when generating the api clients.

Closes #2-1350-fix-openapi-duplicated-tags
2023-08-28 14:03:58 +02:00
Jaanus Sellin
1fbd8b6ef8
feat: applicaton usage endpoint (#4548) 2023-08-23 12:00:22 +03:00
Thomas Heartman
7ea4e5d5b9
chore: remove additionalProperterties: true annotation. (#4508)
Unless you set `additionalProperties` to `false`, additional properties
are always
allowed. By explicitly setting it to `true` the generated
examples contain additional properties, e.g.:

```json
{
  "tokens": [
    "aproject:development.randomstring",
    "[]:production.randomstring"
  ],
  "additionalProp1": {}
}
```

By removing the explicit annotation, we still allow additional
properties, but we don't get them in examples:

```json
{
  "tokens": [
    "aproject:development.randomstring",
    "[]:production.randomstring"
  ]
}
```
2023-08-16 11:17:05 +02:00
Thomas Heartman
eec9593d55
chore: fix formatting of openapi description (#4503)
The indented formatting makes it interpreted as a markdown code block.
This isn't what we want. It's not as pretty, but putting it on one
line makes it render correctly.

What it looks like today:

![image](https://github.com/Unleash/unleash/assets/17786332/5e462931-5a3b-4b75-9cb5-0b21da4838b1)
2023-08-16 08:55:38 +02:00
Nuno Góis
95f4f641b5
docs: custom root roles (#4451)
https://linear.app/unleash/issue/2-1136/custom-root-roles-documentation

- [Adds documentation referencing custom root
roles](https://unleash-docs-git-docs-custom-root-roles-unleash-team.vercel.app/reference/rbac);
- [Adds a "How to create and assign custom root roles" how-to
guide](https://unleash-docs-git-docs-custom-root-roles-unleash-team.vercel.app/how-to/how-to-create-and-assign-custom-root-roles);
 - Standardizes "global" roles to "root" roles;
- Standardizes "standard" roles to "predefined" roles to better reflect
their behavior and what is shown in our UI;
 - Updates predefined role descriptions and makes them consistent;
 - Updates the side panel description of the user form;
- Includes some boy scouting with some tiny fixes of things identified
along the way (e.g. the role form was persisting old data when closed
and re-opened);
 
 Questions:

- Is it worth expanding the "Assigning custom root roles" section in the
"How to create and assign custom root roles" guide to include the steps
for assigning a root role for each entity (user, service account,
group)?
- Should this PR include an update to the existing "How to create and
assign custom project roles" guide? We've since updated the UI;

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-08-10 08:21:58 +01:00
Thomas Heartman
e70ac4d962
openapi: Add new tags for API operations. (#4432)
The new endpoints will be used to categorize and stabilize operations
currently marked as unstable.
2023-08-07 13:17:53 +02:00
andreas-unleash
d21ccb7f1c
Feat: last seen in feature environment (#4391)
- Adds last_seen_at column in feature_environments and lastSeenAt
property to the FeatureEnvironment models

Closes
[1-1181](https://linear.app/unleash/issue/1-1181/implement-storing-last-seen-per-environment-be)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-08-04 09:59:54 +03:00
Thomas Heartman
1481c13b61
openapi: enable strict schema validation by default and fix (#4355)
Enable strict schema validation by default. It can still be overridden
by explicitly setting it to false.

I've also fixed the validation errors that appeared when turning it on.
I've opted for the simplest route and changed the schemas to comply with
the tests.
2023-07-31 11:04:13 +02:00
Thomas Heartman
4ab8accf5c
OpenAPI: remaining schema updates (#4354)
This fixes the last few exceptions to our meta schema validation
2023-07-28 07:25:34 +00:00
Thomas Heartman
df59b10fb6
OpenAPI: more schema cleanup (#4353)
This PR fixes additional schemas that hadn't been described properly
2023-07-28 06:59:05 +00:00
Thomas Heartman
12209ae21c
OpenAPI: clean up remaining schemas, part 1 (#4351)
Part of linear task 1-1167. Fixes the first slew of schemas missing
descriptions/examples, etc.
2023-07-28 08:45:56 +02:00
Mateusz Kwasniewski
88b935fdba
fix: global role is called root role (#4336) 2023-07-24 15:27:07 +02:00
Mateusz Kwasniewski
5de4958b0f
fix: group cleanup (#4334) 2023-07-24 11:05:55 +02:00
Mateusz Kwasniewski
f1d1d7d49a
feat: strategy variants in playground (#4281) 2023-07-21 08:15:15 +02:00
Thomas Heartman
5dd78f3c15
openapi: remove all the extra data info (#4277) 2023-07-19 17:20:17 +02:00
Thomas Heartman
87cec6c9b7
openapi: update ui-config endpoints (#4280) 2023-07-19 17:18:47 +02:00
Mateusz Kwasniewski
276261c913
feat: Group schema updates (#4258) 2023-07-18 11:08:45 +02:00
Thomas Heartman
34aeca2418
#4205: add openapi definition for the new endpoint (#4256)
This PR adds an operation and accompanying openapi docs for the new
"update feature type lifetime" API operation.

It also fixes an oversight where the other endpoint on the same
controller didn't use `respondWithValidation`.

Note: the API here is a suggestion. I'd like to hear whether you agree
with this implementation or not.
2023-07-18 09:00:51 +00:00
andreas-unleash
1f21770977
Feat/feature environment strategy execution reorder (#4248)
<!-- 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! ❤️ -->
When reordering strategies for a feature environment:
- Adds stop when CR are enabled
- Emits an event 

## 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. -->

<!-- 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? -->

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-07-17 17:12:59 +03:00
Tymoteusz Czech
f91c8a338a
fix: feature OpenAPI endpoints - project related (#4212)
Update OpenAPI for `/api/admin/projects/{projectId}/features/` and
related endpoints

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-07-14 16:48:35 +02:00
Mateusz Kwasniewski
e8ea79c967
feat: client api with proper client segments and strategy variants (#4244) 2023-07-14 13:25:31 +02:00
andreas-unleash
5e45ec25e9
Revert "Feat/add strategy update event on strategy ordering (#4234)" (#4243)
This reverts commit 16e3799b9a.


<!-- 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. -->

<!-- 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? -->
2023-07-14 09:11:32 +00:00
Nuno Góis
383e522127
feat: Slack App addon (#4238)
https://linear.app/unleash/issue/2-1232/implement-first-iteration-of-the-new-slack-app-addon

This PR implements the first iteration of the new Slack App addon.
Unlike the old Slack addon, this one uses a Slack App (bot) that is
installed to Slack workspaces in order to post messages. This uses
`@slack/web-api`, which internally uses the latest Slack API endpoints
like `postMessage`.

This is currently behind a flag: `slackAppAddon`.

The current flow is that the Unleash Slack App is installed from
whatever source:
 - Unleash addons page;
 - Direct link;
 - https://unleash-slack-app.vercel.app/ (temporary URL);
 - Slack App Directory (in the future);
 - Etc;

After installed, we resolve the authorization to an `access_token` that
the user can paste into the Unleash Slack App addon configuration form.


https://github.com/Unleash/unleash/assets/14320932/6a6621b9-5b8a-4921-a279-30668be6d46c

Co-authored by: @daveleek

---------

Co-authored-by: David Leek <david@getunleash.io>
2023-07-14 09:49:34 +01:00
andreas-unleash
16e3799b9a
Feat/add strategy update event on strategy ordering (#4234)
Adds a `feature-strategy-update-event` when the strategy sort-order is
changed.

Makes all fields in the eventDataSchema nullable

Closes #
[1-11120](https://linear.app/unleash/issue/1-1112/we-should-have-event-for-re-ordering-strategies)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-07-14 04:46:13 +03:00
Mateusz Kwasniewski
ce87806a80
feat: strategy variant schema openapi (#4232) 2023-07-13 13:50:03 +02:00
Thomas Heartman
8f5bda6b8a
openapi: document operations for admin ui feedback (#4226)
This PR updates the endpoint documentation and schemas related to Admin
UI feedback.
2023-07-13 13:27:52 +02:00
Jaanus Sellin
3da1cbba47
feat: feature creation limit crud together with frontend (#4221) 2023-07-13 14:02:35 +03:00
Thomas Heartman
a785465943
openapi: update the splash endpoints and schemas for splash (#4227)
This change updates the splash endpoints and related schemas for the
admin ui tag.
2023-07-13 08:29:54 +00:00
Thomas Heartman
b927615ebe
openapi: update misc 'features'-tagged endpoints (#4192)
This PR updates a slew of miscellaneous endpoints tagged `Features`
2023-07-11 14:17:10 +02:00
Mateusz Kwasniewski
81c005013e
fix: min items was breaking import (#4219) 2023-07-11 12:42:33 +02:00
Gastón Fournier
58151d8d80
docs: add descriptions and examples to tag schemas (#4194)
## About the changes
- Adding descriptions and examples to tag and tag types schemas
- Adding standard errors, summaries, and descriptions to tag and tag
types endpoints
- Some improvements on compilation errors

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-07-11 10:02:00 +02:00
Christopher Kolstad
4ce78ccecd
docs: add description to requests per seconds schemas (#4182)
### What
Adds a quick and dirty description to requestPerSeconds and
segmentedRequestPerSecondsSchema so the enterprise /rps endpoint has
better API docs.

---------

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
2023-07-10 08:18:08 +00:00
Tymoteusz Czech
ace499d7c6
Update OpenAPI feature strategies (#4175)
## About the changes
Updates for endpoint
`/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies`
and similar
2023-07-07 15:45:04 +00:00
Tymoteusz Czech
1b99b700d6
OpenAPI - feature environment endpoints (#4166)
## About the changes
Fix OpenAPI definitions for endpoint

`/api/admin/projects/{projectId}/features/{featureName}/environments/{environment}`
and similar.
2023-07-07 14:31:03 +02:00
Thomas Heartman
a51b47e956
openapi: update tag description (#4178)
Tiny PR to update the admin UI tag description, including a disclaimer
that it may change at any time.
2023-07-07 11:14:19 +00:00
Mateusz Kwasniewski
23981407ef
fix: validate min constraint values in openapi (#4179) 2023-07-07 12:41:48 +02:00
Mateusz Kwasniewski
d7b7d93533
feat: user openapi spec (#4162) 2023-07-06 15:27:43 +02:00
Thomas Heartman
46b4030d47
bug: mark descriptions on strategies as nullable (#4156)
This was omitted by mistake.

Fixes 1-1086
2023-07-06 13:39:23 +02:00
Christopher Kolstad
b04545c25f
docs: Events tag (#4152)
### What
This PR adds documentation for our endpoints that are covered by our
"Events" tag. It also adds a type for all valid events, and then uses
this as valid values for type argument.
2023-07-06 08:57:09 +00:00
Thomas Heartman
6d591fcd17
openapi: update API tokens tag (#4137)
This PR updates endpoints and schemas for the API tokens tag.

As part of that, they also handle oneOf openapi validation errors and improve the console output for the enforcer tests.
2023-07-06 07:30:31 +00:00
Mateusz Kwasniewski
79b34121a4
feat: openapi schema for user admin (#4146) 2023-07-06 08:24:46 +02:00
Tymoteusz Czech
de8e9a03ae
Inline endpoint descriptions (#4145)
Update OpenApi docs
2023-07-05 11:25:58 +02:00
andreas-unleash
64c1527213
chore: document endpoint tagged Unstable (#4118)
Adds description and summary to all endpoints with Unstable tag
2023-07-04 14:41:16 +00:00
Thomas Heartman
f799f72697
openapi: strategies tag (#4116)
Update OpenAPI schemas and operation descriptions for the strategies
tag.
2023-07-04 14:21:09 +02:00
Christopher Kolstad
0b18491237
docs: Auth tag (#4126)
## What
This adds openapi documentation for the Auth tagged operations and
connected schemas.

## Discussion points
Our user schema seems to be exposing quite a bit of internal fields, I
flagged the isApi field as deprecated, I can imagine quite a few of
these fields also being deprecated to prepare for removal in next major
version, but I was unsure which ones were safe to do so with.

## Observation
We have some technical debt around the shape of the schema we're
claiming we're returning and what we actually are returning. I believe
@gastonfournier also observed this when we turned on validation for our
endpoints.

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-07-04 08:31:54 +00:00
Mateusz Kwasniewski
b50b06c257
feat: Frontend api openapi spec (#4133) 2023-07-03 15:48:09 +02:00
David Leek
3a14b97fdd
feat/telemetry opt out (#4035)
<!-- 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. -->

Adds a UI that shows current status of version and feature usage
collection configuration, and a presence in the configuration menu +
menu bar.

Configuring these features is done by setting environment variables. The
version info collection is an existing feature that we're making more
visible, the feature usage collection feature is a new feature that has
it's own environment configuration but also depends on version info
collection being active to work.

When version collection is turned off and the experimental feature flag
for feature usage collection is turned off:
<img width="1269" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/435a07da-d238-4b5b-a150-07e3bd6b816f">


When version collection is turned on and the experimental feature flag
is off:
<img width="1249" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/8d1a76c5-99c9-4551-9a4f-86d477bbbf6f">


When the experimental feature flag is enabled, and version+telemetry is
turned off:
<img width="1239" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/e0bc532b-be94-4076-bee1-faef9bc48a5b">


When version collection is turned on, the experimental feature flag is
enabled, and telemetry collection is turned off:
<img width="1234" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/1bd190c1-08fe-4402-bde3-56f863a33289">


When version collection is turned on, the experimental feature flag is
enabled, and telemetry collection is turned on:
<img width="1229" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/848912cd-30bd-43cf-9b81-c58a4cbad1e4">


When version collection is turned off, the experimental feature flag is
enabled, and telemetry collection is turned on:
<img width="1241" alt="image"
src="https://github.com/Unleash/unleash/assets/707867/d2b981f2-033f-4fae-a115-f93e0653729b">

---------

Co-authored-by: sighphyre <liquidwicked64@gmail.com>
Co-authored-by: Nuno Góis <github@nunogois.com>
Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-06-30 08:43:58 +02:00
Christopher Kolstad
b99eafc9cc
docs: Context api tag (#4117)
### What
Added documentation for context fields and endpoints tagged with the
"Context" tag.

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.ai>
2023-06-29 14:04:48 +02:00