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

11069 Commits

Author SHA1 Message Date
Mateusz Kwasniewski
843aab7447
fix: remove columns from the search api query (#6996) 2024-05-07 14:44:09 +02:00
Egor Stronhin
8ae8cbbdb4
feat: Allow to use CA certificate file path for DB (#6985)
Regarding ticket #6892:

I would like to enable the use of a CA certificate without requiring
other certificates. This would be useful for AWS Helm, as AWS only
provides a single PEM file for DB connections.
2024-05-07 14:43:19 +02:00
Mateusz Kwasniewski
8ae78236d2
chore: remove project overview refactor flag (#6897) 2024-05-07 13:58:56 +02:00
Mateusz Kwasniewski
d1803b2e62
feat: increase possible number range for yes/no metrics (#6995) 2024-05-07 13:54:56 +02:00
Jaanus Sellin
b69c294272
feat: pass metrics to feature component (#6994)
![image](https://github.com/Unleash/unleash/assets/964450/39bb4551-dc03-4931-8a7f-cd9c0ceda056)
2024-05-07 11:52:38 +03:00
Jaanus Sellin
206d0190ff
feat: create initial stages for features (#6983)
We are getting questions from engineers, why I do not see lifecycle. The
same will happen with our customers. Now customers will see lifecycle
component unified across features.
2024-05-07 11:38:51 +03:00
Mateusz Kwasniewski
a45be8d10c
test: move tests from cypress to rtl (#6987) 2024-05-07 09:03:40 +02:00
Thomas Heartman
913f81b40c
feat: show documentation relating to the specific thing your configuring in the new project form (#6993)
This PR updates the documentation text in the new project form to show
the documentation relating to the specific thing you're configuring.
2024-05-07 08:56:53 +02:00
Jaanus Sellin
77d5156eba
feat: start exposing environment metrics from feature endpoint (#6986)
We want to start showing same donut that we do show in project page.
This is setting it up for UI.
2024-05-07 09:32:46 +03:00
Thomas Heartman
07871e73e5
feat: configure CRs when creating projects (#6979)
This PR adds the ability to configure CRs when creating a project.

The design is unfinished, and the code certainly needs cleanup, but I'd
like to get this into sandbox so we can look at it.

Things that still need to be done:

1. What do we do about this button when the user has no environments
selected? As a rough draft, I've disabled it. However, we should make it
possible to navigate to and give you an explanation why it was disabled,
e.g. "You have no project environments selected. Please select at least
one project environment.".
2. The form design is not done: the width should be constant and not
jumpy the way it is now. Also, the search field is too wide.
3. I've made the desicion that if you deselect a project env, we also
remove that env from your CR config it it's in there.
4. Potential improvement: if you enable and then disable CRs for an env,
we *could* probably store the data in between, so that if you set
required approvers 5 and then disabled it, it'd still be 5 when you
re-enabled it. That sounds like a good user experience. We should also
be able to extend that to adding/removing environments from project
envs.
2024-05-07 08:14:28 +02:00
Ivar Conradi Østhus
2d9fb90443
chore: version in package.json 2024-05-06 19:56:41 +02:00
Mateusz Kwasniewski
8d04772256
fix: duplicate column name in search query (#6989) 2024-05-06 19:26:23 +02:00
Mateusz Kwasniewski
5c27e75014
test: move 2 table tests from cypress to rtl (#6984) 2024-05-06 15:00:53 +02:00
renovate[bot]
975292d109
chore(deps): update dependency @swc/core to v1.4.17 (#6970)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@swc/core](https://swc.rs)
([source](https://togithub.com/swc-project/swc)) | [`1.4.13` ->
`1.4.17`](https://renovatebot.com/diffs/npm/@swc%2fcore/1.4.13/1.4.17) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/@swc%2fcore/1.4.17?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@swc%2fcore/1.4.17?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@swc%2fcore/1.4.13/1.4.17?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@swc%2fcore/1.4.13/1.4.17?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>swc-project/swc (@&#8203;swc/core)</summary>

###
[`v1.4.17`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1417---2024-04-23)

[Compare
Source](https://togithub.com/swc-project/swc/compare/v1.4.16...v1.4.17)

##### Bug Fixes

- **(es)** Ignore `sourceMappingURL` in string literals
([#&#8203;8879](https://togithub.com/swc-project/swc/issues/8879))
([d7188cd](d7188cdb66))

- **(es/codegen)** Use `Str.raw` for es5
([#&#8203;8873](https://togithub.com/swc-project/swc/issues/8873))
([c7a06b1](c7a06b1a5e))

- **(es/compat)** Fix async generator
([#&#8203;8881](https://togithub.com/swc-project/swc/issues/8881))
([063eabd](063eabd33c))

- **(es/resolver)** Prioritze `jsc.paths` by length in tsc resolver
([#&#8203;8875](https://togithub.com/swc-project/swc/issues/8875))
([e22c368](e22c3681a6))

- **(html/codegen)** Expand elements before which body isn’t elided
([#&#8203;8877](https://togithub.com/swc-project/swc/issues/8877))
([5419a94](5419a9477f))

###
[`v1.4.16`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1416---2024-04-18)

[Compare
Source](https://togithub.com/swc-project/swc/compare/v1.4.15...v1.4.16)

##### Bug Fixes

- **(es/helpers)** Fix resolving of `usingCtx` helper
([#&#8203;8874](https://togithub.com/swc-project/swc/issues/8874))
([6e9d1a4](6e9d1a4ebf))

###
[`v1.4.15`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1415---2024-04-17)

[Compare
Source](https://togithub.com/swc-project/swc/compare/v1.4.14...v1.4.15)

##### Bug Fixes

- **(es/codegen)** Fix `ascii_only` for identifiers
([#&#8203;8866](https://togithub.com/swc-project/swc/issues/8866))
([2075a23](2075a23373))

- **(es/minifier)** Remove `raw` of strings after modification
([#&#8203;8865](https://togithub.com/swc-project/swc/issues/8865))
([740c0bb](740c0bb00a))

- **(es/parser)** Fix span of `BindingIdent`
([#&#8203;8859](https://togithub.com/swc-project/swc/issues/8859))
([fbd32fb](fbd32fbff3))

- **(es/proposal)** Update explicit resource management to match spec
([#&#8203;8860](https://togithub.com/swc-project/swc/issues/8860))
([6d24076](6d240768b1))

##### Features

- **(es/transforms)** Allocate stacks dynamically
([#&#8203;8867](https://togithub.com/swc-project/swc/issues/8867))
([a1c5415](a1c5415b3b))

##### Refactor

- **(es/minifier)** Remove `mangle.safari10`
([#&#8203;8857](https://togithub.com/swc-project/swc/issues/8857))
([df2e056](df2e056f29))

##### Build

- **(cargo)** Update rustc to `nightly-2024-04-03`
([#&#8203;8821](https://togithub.com/swc-project/swc/issues/8821))
([ca9c76b](ca9c76b46f))

- **(cargo)** Update `rustc` to `nightly-2024-04-16`
([#&#8203;8870](https://togithub.com/swc-project/swc/issues/8870))
([f9459a8](f9459a8adf))

###
[`v1.4.14`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1414---2024-04-15)

[Compare
Source](https://togithub.com/swc-project/swc/compare/v1.4.13...v1.4.14)

##### Bug Fixes

- **(es/compat)** Handle class fields correctly
([#&#8203;8835](https://togithub.com/swc-project/swc/issues/8835))
([5cc585b](5cc585b8f3))

- **(es/helpers)** Add missing helpers
([#&#8203;8843](https://togithub.com/swc-project/swc/issues/8843))
([67bfcf4](67bfcf41f5))

- **(es/minifier)** Handle switch cases
([#&#8203;8854](https://togithub.com/swc-project/swc/issues/8854))
([7a89e5d](7a89e5da3b))

- **(es/plugin)** Create `tokio` runtime only if necessary
([#&#8203;8845](https://togithub.com/swc-project/swc/issues/8845))
([62c4f5e](62c4f5efb8))

- **(es/resolver)** Correctly check strict mode
([#&#8203;8851](https://togithub.com/swc-project/swc/issues/8851))
([f6ba92b](f6ba92b033))

- **(es/utils)** Preserve optional chain effect
([#&#8203;8850](https://togithub.com/swc-project/swc/issues/8850))
([a7a32c4](a7a32c4b6c))

##### Documentation

- **(swc_core)** Resolve build issue with `--all-features` flag
([#&#8203;8848](https://togithub.com/swc-project/swc/issues/8848))
([c0d901e](c0d901eac6))

##### Refactor

- **(es)** Make the code compile with `miri`
([#&#8203;8836](https://togithub.com/swc-project/swc/issues/8836))
([3a51140](3a51140dd7))

- **(es/decorator)** Remove unsafe code
([#&#8203;8839](https://togithub.com/swc-project/swc/issues/8839))
([e8c6344](e8c63447f6))

- **(visit)** Simplify `Vec::move_map`
([#&#8203;8838](https://togithub.com/swc-project/swc/issues/8838))
([b1973d4](b1973d490a))

##### Testing

- **(es)** Update `conformance` test suite from `tsc`
([#&#8203;8834](https://togithub.com/swc-project/swc/issues/8834))
([ea5d9cc](ea5d9cc524))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 7pm every weekday,before 5am
every weekday" in timezone Europe/Madrid, Automerge - At any time (no
schedule defined).

🚦 **Automerge**: Enabled.

♻ **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://developer.mend.io/github/Unleash/unleash).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMzEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjMzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-06 12:46:00 +00:00
Mateusz Kwasniewski
d01100fbf0
test: move import test from cypress to RTL to make it less flaky (#6982) 2024-05-06 14:40:47 +02:00
Jaanus Sellin
d698eccb4a
fix: badge should render children 0 value (#6981)
When passing 0 in as child, the 0 was not rendred. Fixed the badge
component and added tests.


![image](https://github.com/Unleash/unleash/assets/964450/d681b70c-5d55-4818-86ea-7d05fa86c7b3)
2024-05-06 13:24:52 +03:00
Jaanus Sellin
233b882c7b
feat: merge feature toggle details with feature meta info box (#6977)
![image](https://github.com/Unleash/unleash/assets/964450/5286eb36-311d-42f9-90da-832724cc41d0)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
Co-authored-by: andreas-unleash <andreas@getunleash.ai>
2024-05-06 12:17:54 +03:00
Jaanus Sellin
2c05f1a0ce
feat: search order by final (#6976)
Final rank has always been ordering correctly by default. But after 5.12
I see some issues that sometimes it is not ordered. Just to be extra
sure, I am for ordering it.
2024-05-03 13:30:12 +03:00
Thomas Heartman
bd0cd018c9
support setting mode and stickiness in new project form (#6972)
This PR is a combination of two PRs:

This PR adds a functioning environment selection button to the new project creation form. Selected environments are added to the payload and to the API preview.

The implementation is mostly lifted from the existing FilterItem component we have for search filters. However, our need here is less complex, so I've removed some of the things we don't need. There is still more cleanup to be done, however, but I'd like to implement the rest of the submenus first, to see what we really do need in the end.

---

This PR adds support for stickiness and project mode in the new project
creation form.

Achieve this, it does a few things:

1. Moves `resolveStickinessOptions` from
`frontend/src/component/feature/StrategyTypes/FlexibleStrategy/StickinessSelect/StickinessSelect.tsx`
and into a separate hook. This component was used by the old project
creation form. Because the new form has a different input, but needs the
same option, moved that code into a reusable hook.
2. It adds functioning buttons for project stickiness and mode.
3. It adds labels to the search inputs for the dropdowns. Inputs *must*
have labels to meet a11y requirements. However, the designs don't have
labels, so we can hide them visually. Though that leads to another issue
(refer to the screen shot below).
4. It updates the `SelectionButton` component to handle both single- and
multiselect cases. It instead exports these two subcomponents. These are
currently in one file, but I'll split them out into their separate files
in a later PR.

As a side effect of working with the selection buttons, it also improves
how we handle keyboard interaction for these buttons.

Here's what it looks like for single-select lists. Notice the missing
part of the input's border around the top (where the label *would* be if
we showed it). We should figure out how best to handle it. I've done
like this for now, but we can sort it out later.


![image](https://github.com/Unleash/unleash/assets/17786332/5af979c2-6635-481e-8d3e-5aad1c0ab46f)
2024-05-03 07:27:13 +02:00
Thomas Heartman
44e86fc068
chore: fix failing test; don't rely on a single item only (#6974)
This test is breaking right now because it tests a date picker, week 21
is approaching, and `findByText` only expects a single element. Checking
that we have *at least* one element fixes that breakage and I don't
think it should cause any issues.

Of course, that means that right now, this test would also pass even if
the expected button wasn't there, but it would stop passing in about
four weeks time.
2024-05-02 15:03:49 +02:00
Jaanus Sellin
5c61667282
feat: add completed event as webhook event (#6968)
Now feature completed event can be used with webhook.
2024-05-02 14:48:33 +03:00
Nuno Góis
95ebe25ada
docs: update feature availability (#6971)
Updates feature availability. 

Banners is a feature that is already GA'd since Unleash 5.7, so beta
availability seems irrelevant now.

We removed the mention of planning to GA Signals & Actions in 5.12,
since that's not happening and we would prefer not to include these
mentions in the future.
2024-05-02 11:19:44 +01:00
Alvin Bryan
4ad56e8afc
Adds contributors to docs (#6900)
Hello!

We wanted to make the docs less impersonal, so we decided to add
contributors. Now each doc page that has an `editUrl` (i.e, isn't
generated) shows a list of everyone that contributed to it.

This list is generated by:
1. Running `swizzle` on the `DocItem/Footer` in Docusaurus.
2. Grabbing metadata for the current file using an internal docusaurus
API (Thank you to @homotechsual for the help there)
3. Getting the commits to the file in question with the GitHub API


![image](https://github.com/Unleash/unleash/assets/107407814/fd9c92ef-36ab-4d9e-ac11-6d724fd55d11)

<details>
 <summary> Here's the command I ran, for posterity </summary>
<code>npm run swizzle @docusaurus/theme-classic DocItem/Footer --
--wrap</code>
</details>


## Discussion points

1. Design. What do you think of the layout?
2. Right now I'm hardcoding the info of Unleash team members. This
creates a small maintenance burden, but it's something we wanted to add.
2024-04-30 15:19:38 +01:00
Tymoteusz Czech
0bacd60caf
refactor: badge icon spacing (#6962)
Simplified after previous modifications
2024-04-30 14:14:04 +02:00
Thomas Heartman
4fea198d6c
chore: add project icon to new form (#6965)
Imports and uses the same project icon used on the project cards. Also
aligns the header better and makes the text lighter.


![image](https://github.com/Unleash/unleash/assets/17786332/bf5082b0-1f00-45bb-a639-864963b6fe77)
2024-04-30 13:18:27 +02:00
Thomas Heartman
cdbe26330e
feat: enable project creation through new form (#6961)
This PR allows very simple project creation. You can add a name and
description. The ID is generated for you at the moment (we'll fix this
later). Nothing else works, but the project is created successfully.
2024-04-30 13:00:58 +02:00
Christopher Kolstad
7754ac69df
task: added migration for scim_external_id (#6966) 2024-04-30 10:24:17 +02:00
andreas-unleash
979220d80d
chore: scheduled change request cache kill switch (#6957)
Removes the `inMemoryScheduledChangeRequests` flag and adds
`killScheduledChangeRequestCache`

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2024-04-30 09:33:42 +03:00
Thomas Heartman
f77f8a71f8
rough layout of the new form (#6960)
This PR adds a very rough first implementation of the look of the new
project form. *It is not final and does not work yet*.

The important part here is that the layout is roughly right (we'll
adjust spacing etc later) and that we've got all the basic elements
present.

I'll hook it up to actually work in an upcoming PR. 


![image](https://github.com/Unleash/unleash/assets/17786332/b941702f-ec1b-4d16-9628-ba560b0919f2)

The missing icon, text alignment, etc, will also be solved later.
2024-04-30 08:09:07 +02:00
Jaanus Sellin
2ba250fa41
feat: do not insert into database stages that already exist (#6964)
Previously when we had thousands of metrics coming in, we were trying to
write them all to database and running into on conflict
2024-04-30 09:07:20 +03:00
Thomas Heartman
a66b3c65c1
chore: add flag for the new project creation form layout (#6959)
Add a flag to enable/disable the new UI for project creation.
This flag is separate from the impl on the back end so that we can
enable one without the other (but uses flag dependencies in Unleash, so
that we can never enable the new UI without the new back end).

I have not set the flag to `true` in server startup because the form
doesn't work yet, so it's a manual step for now.
2024-04-29 13:52:56 +02:00
Thomas Heartman
491cd588da
chore: remove workaround (#6942)
This PR removes the workaround introduced in
https://github.com/Unleash/unleash/pull/6931. After
https://github.com/ivarconr/unleash-enterprise/pull/1268 has been
merged, this should be safe to apply.

Notably, this PR: 
- tightens up the type for the enable change request function, so we can
use that to inform the code
- skips trying to do anything with an empty array

The last point is less important than it might seem because both the env
validation and the current implementation of the callback is essentially
a no-op when there are no envs. However, that's hard to enforce. If we
just exit out early, then at least we know nothing happens.

Optionally, we could do something like this instead, but I'm not sure
it's better or worse. Happy to take input.
```ts
            const crEnvs = newProject.changeRequestEnvironments ?? []
            await this.validateEnvironmentsExist(crEnvs.map((env) => env.name));
            const changeRequestEnvironments =
                await enableChangeRequestsForSpecifiedEnvironments(crEnvs,);

            data.changeRequestEnvironments = changeRequestEnvironments;
```
2024-04-29 13:47:47 +02:00
David Leek
c048156e19
fix: disable SCIM for OIDC, nothing to test it on (#6937)
disable SCIM for OIDC, nothing to test it on
Also checks scim enabled before saving
2024-04-29 13:14:39 +02:00
Tymoteusz Czech
b6865a5a9d
feat: Project owners UI (#6949)
---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-04-29 11:51:44 +02:00
Ivar Conradi Østhus
3978c690e0
fix: Data usage metrics chart included per day annotion (#6941)
Added a small annotation to the chart on how much data is included in
the pro plan on average per day to make it easier to spot when a
customer average above the included threshold.


![image](https://github.com/Unleash/unleash/assets/158948/c3105f87-03e0-4b27-9e3f-53c749c78078)
2024-04-29 10:35:01 +02:00
gitar-bot[bot]
010c4ee57b
[Gitar] Cleaning up stale feature flag: applicationOverviewNewQuery with value true (#6956)
---------

Co-authored-by: Gitar Bot <noreply@gitar.co>
Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2024-04-29 11:02:08 +03:00
Alvin Bryan
d1cad6ece3
Example Docs fixes (#6919)
Hello, 

As discussed with @sighphyre, there were a number of problems with the
examples docs. This addresses the most pressing ones, namely:

- Corrected the link to the Jira plugin
- Added deprecation warning to Jira Server pages
- Removed the incomplete markdown table at the end of articles, and the
references to it

---------

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
2024-04-26 17:22:16 +01:00
David Leek
0ac9624caf
fix: fix UI issues with SCIM new token button (#6948)
Makes the regenerate token button in SCIM settings behave like the rest
of the grid (remove margin left, add margin bottom)


![image](https://github.com/Unleash/unleash/assets/707867/ff3ac26e-87b3-4862-aebd-cdba0011ddad)
2024-04-26 14:31:53 +02:00
Jaanus Sellin
9f6badf5df
feat: add ui test for mark completed button (#6953)
Co-authored-by: kwasniew <kwasniewski.mateusz@gmail.com>
2024-04-26 14:31:20 +02:00
Mateusz Kwasniewski
49e84d3a91
feat: Check production enabled live stage (#6952) 2024-04-26 13:38:25 +02:00
Tymoteusz Czech
514a18bf93
Update OpenAPI generated types for frontend (#6950) 2024-04-26 13:31:15 +02:00
Jaanus Sellin
7022ce8afb
feat: rever to live connected to backend (#6951)
![Screenshot from 2024-04-26
13-30-48](https://github.com/Unleash/unleash/assets/964450/03c57c62-bf51-440b-935d-46da729e3157)
![Screenshot from 2024-04-26
13-15-45](https://github.com/Unleash/unleash/assets/964450/c5ac44be-39dc-4b6c-97ec-5fc56b0cc111)
2024-04-26 13:43:38 +03:00
Mateusz Kwasniewski
1739f8e11d
feat: pre-live is non production not just dev (#6946) 2024-04-26 12:43:10 +02:00
Tymoteusz Czech
66ec9a2f2f
feat: project owners in project service (#6935)
Schema and integrating into service and controller for project owners

---------

Co-authored-by: Thomas Heartman <thomas@getunleash.io>
2024-04-26 12:07:11 +02:00
Jaanus Sellin
7d01dbb748
feat: feature completed connected to backend (#6947)
Connects feature complete to backend
2024-04-26 12:20:34 +03:00
Jaanus Sellin
78b9299ff1
feat: feature lifecycle complete and uncomplete (#6927)
Creating a way to complete and uncomplete feature.
2024-04-26 11:38:42 +03:00
Mateusz Kwasniewski
31ab38e162
fix: ignore metrics for non-existent features (#6945) 2024-04-26 10:30:12 +02:00
Mateusz Kwasniewski
8ed15165d2
feat: revived feature goes to initial lifecycle stage (#6944) 2024-04-26 09:50:13 +02:00
Mateusz Kwasniewski
675e1a9f8b
feat: archive feature from lifecycle (#6938) 2024-04-26 09:29:07 +02:00
Thomas Heartman
3fb53737c6
feat: include CR envs enabled on creation in event and update validation (#6931)
This PR improves the handling of change request enables on project
creation in two ways:

1. We now verify that the envs you try to enable CRs for exist before
passing them on to the enterprise functionality.
2. We include data about environments and change request environments in
the project created events.
2024-04-26 07:21:29 +02:00