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

9803 Commits

Author SHA1 Message Date
Christopher Kolstad
c179c8ad5e
chore(update): Updates biome config to 1.3 format (#5421)
Does what it says on the tin, update to 1.3.x format for biome config
2023-11-27 13:42:58 +01:00
renovate[bot]
0a6055b7e0
chore(deps): update dependency @types/deep-diff to v1.0.5 (#5430)
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/deep-diff](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/deep-diff)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) |
[`1.0.4` ->
`1.0.5`](https://renovatebot.com/diffs/npm/@types%2fdeep-diff/1.0.4/1.0.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fdeep-diff/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fdeep-diff/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fdeep-diff/1.0.4/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fdeep-diff/1.0.4/1.0.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 12:23:23 +00:00
Mateusz Kwasniewski
80fff20bd4
docs: fix go and php versions with dependent flags support (#5420) 2023-11-27 13:04:54 +01:00
renovate[bot]
249aac677c
chore(deps): update dependency @types/debounce to v1.2.4 (#5428)
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/debounce](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/debounce)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) |
[`1.2.3` ->
`1.2.4`](https://renovatebot.com/diffs/npm/@types%2fdebounce/1.2.3/1.2.4)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fdebounce/1.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fdebounce/1.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fdebounce/1.2.3/1.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fdebounce/1.2.3/1.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 11:17:21 +00:00
Nuno Góis
023db4e2c9
refactor: favor permission name over id (#5409)
https://linear.app/unleash/issue/2-1664/create-db-migration-that-favors-the-name-column-over-id-for

Similar to https://github.com/Unleash/unleash/pull/5398, but
non-breaking (semver).
This keeps the permissions `id` column intact, however favors the
permission name whenever possible.
2023-11-27 11:12:09 +00:00
Thomas Heartman
b021e7cf85
feat: show strategies used by segments (#5407)
This PR displays change request usage of segments when such usage is
returned from the API. It expects at least #5406 to have been merged
before it can be merged.


![image](https://github.com/Unleash/unleash/assets/17786332/c74bb1c9-07f9-4bca-95bb-4ca020398444)
2023-11-27 10:34:34 +00:00
renovate[bot]
20bfa73b82
chore(deps): update dependency @types/cors to v2.8.16 (#5427)
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/cors](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cors)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) |
[`2.8.15` ->
`2.8.16`](https://renovatebot.com/diffs/npm/@types%2fcors/2.8.15/2.8.16)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fcors/2.8.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fcors/2.8.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fcors/2.8.15/2.8.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fcors/2.8.15/2.8.16?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 10:34:10 +00:00
Thomas Heartman
90915cfdd7
Chore: add strategy sorting algorithm (#5406)
This PR adds a strategy sorting algorithm to be used for the segment
deletion dialog. It assumes that you have a list of existing strategies
and a list of change request strategies. Based on the content of these
two lists, it will create one unified list sorted after a number of
criteria (as listed in the test).

# Discussion point: 

This impl does the sorting on the front end, but could we do it on the
back end? Instead of adding a new property to the segment data, could we
simply fold the change request strategies in with the existing segment
strategies and return it using the old property? If the only place we do
that is in this view, then that might be a good suggestion.

Response:

I'll leave this in the front end for now. The reason is that we can't add change request strategies to the existing `strategies` property of the API payload without it being a breaking change. The OpenAPI schema says that `id` is a required field on a strategy, and that field doesn't exist on strategies that have only been added in change requests, but not yet applied.
2023-11-27 11:23:10 +01:00
renovate[bot]
67b9578545
chore(deps): update dependency @types/bcryptjs to v2.4.6 (#5426)
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/bcryptjs](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bcryptjs)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped)) |
[`2.4.5` ->
`2.4.6`](https://renovatebot.com/diffs/npm/@types%2fbcryptjs/2.4.5/2.4.6)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fbcryptjs/2.4.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fbcryptjs/2.4.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fbcryptjs/2.4.5/2.4.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fbcryptjs/2.4.5/2.4.6?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 10:22:24 +00:00
Thomas Heartman
f46d5a9269
chore: update segment cr return values (#5405)
This PR updates the returned value about segments to also include the CR
title and to be one list item per strategy per change request. This
means that if the same strategy is used multiple times in multiple
change requests, they each get their own line (as has been discussed
with Nicolae).

Because of this, this pr removes a collection step in the query and
fixes some test cases.
2023-11-27 11:20:39 +01:00
Thomas Heartman
0a43d341c0
fix: check whether a usage data is defined (#5393)
The previous check would return `false` if the value was 0, causing a
bug where the usage data wouldn't be included.

This also adds tests to ensure that usage data for CR segments is
propagated correctly because that's where I first encountered the issue.

Before this fix, if the values were 0, the data would display like the
bottom element in the screenshot:


![image](https://github.com/Unleash/unleash/assets/17786332/9642b945-12c4-4217-aec9-7fef4a88e9af)
2023-11-27 11:20:25 +01:00
renovate[bot]
ffa14a0373
chore(deps): update dependency @swc/core to v1.3.96 (#5424)
[![Mend Renovate logo
banner](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.3.95` ->
`1.3.96`](https://renovatebot.com/diffs/npm/@swc%2fcore/1.3.95/1.3.96) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/@swc%2fcore/1.3.96?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@swc%2fcore/1.3.96?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@swc%2fcore/1.3.95/1.3.96?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@swc%2fcore/1.3.95/1.3.96?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

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

###
[`v1.3.96`](https://togithub.com/swc-project/swc/blob/HEAD/CHANGELOG.md#1396---2023-11-03)

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

##### Bug Fixes

- **(ci)** Set `tag` for wasm publish actions
([#&#8203;8200](https://togithub.com/swc-project/swc/issues/8200))
([8db80b8](8db80b8c28))

- **(es/compat)** Make `block-scoping` pass rename exports correctly
([#&#8203;8175](https://togithub.com/swc-project/swc/issues/8175))
([b13bc32](b13bc32027))

- **(es/compat)** Use dummy span for blocks in `parameters`
([#&#8203;8202](https://togithub.com/swc-project/swc/issues/8202))
([c1b255a](c1b255a59c))

- **(es/compat)** Handle private names from class properties pass
([#&#8203;8090](https://togithub.com/swc-project/swc/issues/8090))
([83a5a0c](83a5a0c612))

- **(es/react)** Visit children nodes in `jsx-src` pass
([#&#8203;8212](https://togithub.com/swc-project/swc/issues/8212))
([47733a9](47733a951c))

- **(es/transforms)** Do not add `PURE` comment to `BytePos(0)`
([#&#8203;8207](https://togithub.com/swc-project/swc/issues/8207))
([c061356](c061356b63))

- **(es/typescript)** Preserve const enum for named export
([#&#8203;8208](https://togithub.com/swc-project/swc/issues/8208))
([abced23](abced23b2a))

##### Features

- **(es/minifier)** Respect inline level and preserve native names
([#&#8203;8205](https://togithub.com/swc-project/swc/issues/8205))
([dd805e9](dd805e95a4))

- **(es/preset-env)** Update compat data
([#&#8203;8194](https://togithub.com/swc-project/swc/issues/8194))
([3dc4e1e](3dc4e1e02d))

- **(es/testing)** Support babel-like fixture testing officially
([#&#8203;8190](https://togithub.com/swc-project/swc/issues/8190))
([e960614](e9606147fc))

- **(es/testing)** Use `__swc_snapshots__` for `test!` macro
([#&#8203;8191](https://togithub.com/swc-project/swc/issues/8191))
([0aafa75](0aafa75fef))

##### Performance

- **(es/minifier)** Add `has_flag` to `Comments`
([#&#8203;8182](https://togithub.com/swc-project/swc/issues/8182))
([7530e90](7530e9051d))

##### Refactor

- **(es/minifier)** Simplify analyzer context
([#&#8203;8164](https://togithub.com/swc-project/swc/issues/8164))
([bb02cdd](bb02cdd26e))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 09:31:19 +00:00
renovate[bot]
713d69fc7a
chore(deps): update dependency @babel/core to v7.23.3 (#5422)
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

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

---

### Release Notes

<details>
<summary>babel/babel (@&#8203;babel/core)</summary>

###
[`v7.23.3`](https://togithub.com/babel/babel/blob/HEAD/CHANGELOG.md#v7233-2023-11-09)

[Compare
Source](https://togithub.com/babel/babel/compare/@babel/core@7.23.2...v7.23.3)

##### 🐛 Bug Fix

-   `babel-plugin-transform-typescript`
- [#&#8203;16071](https://togithub.com/babel/babel/pull/16071) Strip
type-only TS namespaces
([@&#8203;colinaaa](https://togithub.com/colinaaa))
-   `babel-generator`
- [#&#8203;16078](https://togithub.com/babel/babel/pull/16078) Fix
indentation when generating comments with `concise: true`
([@&#8203;liuxingbaoyu](https://togithub.com/liuxingbaoyu))
- `babel-compat-data`,
`babel-plugin-bugfix-v8-static-class-fields-redefine-readonly`,
`babel-preset-env`
- [#&#8203;14295](https://togithub.com/babel/babel/pull/14295) Add a
bugfix plugin for https://crbug.com/v8/12421
([@&#8203;nicolo-ribaudo](https://togithub.com/nicolo-ribaudo))
-   `babel-plugin-transform-object-super`
- [#&#8203;15948](https://togithub.com/babel/babel/pull/15948) fix:
`super.x` in a loop
([@&#8203;liuxingbaoyu](https://togithub.com/liuxingbaoyu))
- `babel-helper-module-transforms`,
`babel-plugin-transform-modules-amd`,
`babel-plugin-transform-modules-commonjs`,
`babel-plugin-transform-modules-umd`
- [#&#8203;16015](https://togithub.com/babel/babel/pull/16015) fix:
handle `__proto__` exports name in CJS/AMD/UMD
([@&#8203;magic-akari](https://togithub.com/magic-akari))

##### 📝 Documentation

- [#&#8203;16044](https://togithub.com/babel/babel/pull/16044) docs:
Update links in
[@&#8203;babel/eslint-parser](https://togithub.com/babel/eslint-parser)
README ([@&#8203;aryehb](https://togithub.com/aryehb))

##### 🏠 Internal

-   `babel-core`, `babel-preset-env`
- [#&#8203;15988](https://togithub.com/babel/babel/pull/15988) Refactor
handling of modules plugins in `preset-env`
([@&#8203;nicolo-ribaudo](https://togithub.com/nicolo-ribaudo))

##### 🏃‍♀️ Performance

-   `babel-generator`
- [#&#8203;16061](https://togithub.com/babel/babel/pull/16061) perf:
Improve `@babel/generator` performance
([@&#8203;liuxingbaoyu](https://togithub.com/liuxingbaoyu))
-   `babel-traverse`
- [#&#8203;16060](https://togithub.com/babel/babel/pull/16060) Avoid
dynamic dispatch when calling wrapCheck
([@&#8203;yepitschunked](https://togithub.com/yepitschunked))

##### 🔬 Output optimization

-   `babel-plugin-transform-computed-properties`
- [#&#8203;6652](https://togithub.com/babel/babel/pull/6652) Optimize
computed properties output (byte-wise)
([@&#8203;Andarist](https://togithub.com/Andarist))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
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:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 09:12:23 +00:00
renovate[bot]
5816c57bd3
chore(deps): update dependency cypress to v13.5.1 (#4896) 2023-11-27 10:07:22 +01:00
Chris Hepner
ef46b042cc
fix: typo in Unleash playground frontend (#5389)
## About the changes

- Change "undestand" to "understand"
- Capitalize "Unleash"

Co-authored-by: Chris Hepner <chris@healthtensor.com>
2023-11-27 09:30:00 +01:00
Christopher Kolstad
a6cde07af0
Updated scripts to use owner (#5341)
See [Linear issue
2-1627](https://linear.app/unleash/issue/2-1627/db-permissions-update-docs-and-migration-guides).

Since we now use functions, we need more permissions than just GRANT ALL
PERMISSIONS ON DATBASE. In addition we need to be allowed to create
functions in the schema that's actually being used. This PR takes the
easy way out and say that we need OWNER privileges on the database. That
guarantees that we can do all we do in our migration scripts.

### Discussion points
We might encounter some pushback on this, if so, we'll need to say that
we need
`GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN <schema>` in addition to GRANT
ALL PRIVILEGES ON DATABASE, where <schema> is the schema selected in
their configuration.
2023-11-27 07:55:03 +00:00
Gard Rimestad
eb42246ce2
feat: add accessLogs feature flag (#5417)
This is a feature flag in unleash-enterprise
2023-11-27 08:07:42 +01:00
Christopher Kolstad
24d111c4c5
docs: Update recommended postgres to 14 (#5240)
We've been caught out here, we added a migration that used PG>=11
syntax, but our docs still state that we support v10, when it reached
EoL Nov 2022. This updates our docs to state v14 and newer, v14 came out
in 2021 and as such won't be EoL until 2026 according to [Postgres 5
year versioning scheme
support](https://www.postgresql.org/support/versioning/)
2023-11-25 09:27:11 +01:00
Tymoteusz Czech
dbd897e3bd
Feat/new paginated table (#5371)
## About the changes
2023-11-24 17:50:58 +01:00
Ivar Conradi Østhus
f00eac0881
fix: User audit events (create, update, delete) should include rootRole. (#5399)
Audit events for USER_CREATE, USER_UPDATE and USER_DELETE did not
include the users rootRole.


![image](https://github.com/Unleash/unleash/assets/158948/fcbc1407-e4f0-438f-86cf-7073205cd8c2)

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2023-11-24 16:06:37 +01:00
Nuno Góis
47e214d96f
fix: enable toggle with disabled strategies dialog (#5416)
https://linear.app/unleash/issue/UNL-283/improve-dialog-when-there-are-disabled-strategies-and-we-want-to

Improves the "enable toggle when there are disabled strategies" dialog.
Also implements passing in the missing `disabledStrategiesCount`
property to the dialog.


![image](https://github.com/Unleash/unleash/assets/14320932/95d9110e-8c1c-47ce-8e1b-389607115a54)
2023-11-24 14:57:03 +00:00
Mateusz Kwasniewski
2e96ace14e
feat: feature type updated audit log (#5415) 2023-11-24 14:24:31 +01:00
Gastón Fournier
d680e50055
feat: audit roles (#5408)
## About the changes
Audit changes to roles both root and project roles.
2023-11-24 14:22:31 +01:00
Mateusz Kwasniewski
295b0c073e
fix: missing user id in segment update (#5414) 2023-11-24 11:17:36 +01:00
Mateusz Kwasniewski
ce382a4bf9
fix: prevent concurrent queries from running out of transaction (#5412) 2023-11-24 11:11:26 +01:00
Nuno Góis
aa8347eb7a
fix: delete archived feature toggles in the UI (#5411)
This PR addresses 2 tasks that aim to fix and improve the UI/UX on
archived feature toggle deletion:

-
https://linear.app/unleash/issue/UNL-260/delete-feature-toggle-dialog-update-word-toggles-to-singular-toggle
-
https://linear.app/unleash/issue/UNL-282/deleting-multiple-toggles-in-the-project-archive-the-batch-selector

Essentially:

- Makes it clearer that we're deleting a single feature toggle by
changing the text to singular toggle
- Improves clarity further by adding a list of feature toggles about to
be deleted
- Fixes a bug where the batch selector would not be cleared after
deleting multiple feature toggles

## Deleting one feature toggle (singular)

![image](https://github.com/Unleash/unleash/assets/14320932/c956f459-ef18-4153-97f7-ffdd6b11613c)

## Deleting multiple feature toggles (plural)

![image](https://github.com/Unleash/unleash/assets/14320932/14f875a4-7f56-4db9-81db-cd06526e5bd5)
2023-11-24 09:35:13 +00:00
Tymoteusz Czech
ffe37ac709
Basic filter label (#5387) 2023-11-24 10:07:42 +01:00
Jaanus Sellin
b0c05111c6
feat: allow filtering projects with operators (#5400)
This is first iteration. When we add more fields to be filterable with
operators, we can have more reusable components for this.
2023-11-24 10:45:44 +02:00
andreas-unleash
2e1790985c
feat: Handle scheduled request events in addons (#5403)
- Create 2 new events to replace the SCHEDULED_CHANGE_REQUEST_EXECUTED
event
- Handle the 3 events in slack-app and webhook addon definitions

3 events handled:
- CHANGE_REQUEST_SCHEDULED
- CHANGE_REQUEST_SCHEDULED_APPLICATION_SUCCESS
- CHANGE_REQUEST_SCHEDULED_APPLICATION_FAILURE

Closes #
[1-1555](https://linear.app/unleash/issue/1-1555/update-change-request-scheduled-and-scheduled-change-request-executed)

Note: SCHEDULED_CHANGE_REQUEST_EXECUTED will be removed in follow up PR
not to break current enterprise build

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-23 15:00:24 +02:00
Ivar Conradi Østhus
916e4c99b1
fix: upgrade wait-on to v7.2.0 2023-11-23 13:45:36 +01:00
Ivar Conradi Østhus
6df127059a
fix: upgrade @slack/web-api to v6.10.0 2023-11-23 13:41:49 +01:00
Fredrik Strand Oseberg
a8ea8d3fbe
Fix/clean last seen environments (#5402)
This PR addresses some cleanup related to removing the
useLastSeenRefactor flag:

* Added fallback last seen to the feature table last_seen_at column 
* Remove foreign key on environment since we can not guarantee that we
will get valid data in this field
* Add environments to cleanup function
* Add test for cleanup environments
2023-11-23 12:12:58 +01:00
Nuno Góis
88a034d066
fix: dedupe any duplicate permissions (#5397)
https://linear.app/unleash/issue/2-1656/create-db-migration-that-ensures-correct-state-of-permissions

This adds a migration that dedupes any duplicate permissions.
2023-11-23 10:23:21 +00:00
Nuno Góis
7d2fd172a5
fix: role permissions UI improvements (#5388)
https://linear.app/unleash/issue/2-1657/role-permissions-improvements

This PR includes 3 improvements:
 - Sort permissions alphabetically
 - Ensure we don't display duplicate permissions
 - Improve alignment of columns by using a proper grid


![image](https://github.com/Unleash/unleash/assets/14320932/7cb4a70e-8e39-4077-95a0-66f29b3c2e55)
2023-11-23 09:43:15 +00:00
Ivar Conradi Østhus
ce01687e3b
fix: Audit events for segments should include project id (#5401) 2023-11-23 10:32:49 +01:00
andreas-unleash
937a605888
chore: remove variantTypeNumber flag (#5382)
Closes #
[1-1648](https://linear.app/unleash/issue/1-1648/clean-varianttypenumber-flag-for-release)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-23 11:12:56 +02:00
andreas-unleash
1dafc85eaa
chore: remove playgroundImprovements flag (#5384)
Closes #:

[1-1647](https://linear.app/unleash/issue/1-1647/clean-playgroundimprovements-flag-for-release)

[1-1665](https://linear.app/unleash/issue/1-1665/flaky-test-playgroundconnectionfieldsettesttsx)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-23 10:50:19 +02:00
andreas-unleash
3e12c2b5b6
Chore: remove disableEnvsOnRevive flag (#5391)
Closes #
[1-1646](https://linear.app/unleash/issue/1-1646/clean-disableenvsonrevive-flag-for-release)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-23 10:10:37 +02:00
Thomas Heartman
b211345a44
fix: if a strategy both uses a segment actively and in CRs, list it twice (#5390)
This PR changes the behavior of the API a little bit. Instead of
removing any strategies from `changeRequestStrategies` that are also
in `strategies`, we keep them in instead.

The reason for this is that the overview of where a segment is used is
incomplete if it shows only strategies but not CRs. Imagine this:

You want to delete a segment, but you're told it's only used in strategy
S.
So you go and remove it from strategy S, but then you're told it's
suddenly used in CRs A, B, and C. This is now a two-step operation
with a bad surprise. Instead, we could show you immediately that this
segment is used in strategy S and CRs A, B, and C.
2023-11-22 14:13:18 +01:00
Jaanus Sellin
432aed3034
feat: support multiple terms in search, remove tag support in search (#5395)
1. Removing tag support in search
2. Adding multi keyword support for search
2023-11-22 15:06:07 +02:00
Fredrik Strand Oseberg
5414fa6663
Refactor/remove last seen at flag (#5394)
This PR removes the feature flag for displaying the new last seen by
environments component.
2023-11-22 13:32:38 +01:00
Thomas Heartman
dc1aaf6d99
chore: only return change request data if the unleash instance is an enterprise instance (#5331)
Otherwise, we might accidentally display CR data to open source users.
But more importantly, it might keep them from being able to delete a
segment that's in use by a CR in their database that they can't touch.

So by checking that they're on an enterprise instance, we avoid this
potential blocker.

I've added the `includeChangeRequestUsageData` parameter as a boolean
now, but I'm open to other suggestions.
2023-11-22 12:15:29 +00:00
Jaanus Sellin
68558fc774
feat: able to search by description (#5392) 2023-11-22 14:08:52 +02:00
Nuno Góis
5dc3e830a8
feat: add CREATE_TAG_TYPE permission (#5386)
https://linear.app/unleash/issue/2-1164/update-tag-type-covers-both-creation-and-update

Adds a new `CREATE_TAG_TYPE` permission instead of using
`UPDATE_TAG_TYPE` for both actions.
2023-11-22 10:20:19 +00:00
Thomas Heartman
fac2578922
chore: avoid duplicates (#5381)
This PR handles the case where a single strategy is used in multiple
change requests. Instead of listing the strategy several times in the
output, we consolidate the entries and add a new `changeRequestIds`
property. This is a non-empty list that points to all the change
requests it is used in.

This is required for us to be able to link back to the change requests
from the UI overview.
2023-11-22 10:26:35 +01:00
andreas-unleash
8ffc92af5b
fix: Only show strategy variant changes if there is a diff in the variants (#5353)
What it says on the box

Closes #
[1-1652](https://linear.app/unleash/issue/1-1652/remove-the-variants-from-change-request-page-when-not-modified)

![Screenshot 2023-11-16 at 11 26
05](https://github.com/Unleash/unleash/assets/104830839/8f25b82c-4dbc-46fb-bdd6-0e0049659c72)

![Screenshot 2023-11-16 at 11 25
46](https://github.com/Unleash/unleash/assets/104830839/e6366622-3a50-4a0e-bba2-6c1d34e64077)

---------

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
2023-11-22 09:50:03 +02:00
Thomas Heartman
9ac3d7511a
chore: use query to get strategies instead of whether a segment is in use (#5375)
This change is just a refactor, removing code that's no longer used. Instead of
checking just whether a segment is in use, we now extract the list of
strategies that use this segment. This is slightly more costly,
perhaps, but it will be necessary for the upcoming implementation.
2023-11-22 06:54:28 +00:00
Thomas Heartman
8337885e47
feat: return CR uses of segments when flag is active (#5378)
This PR changes the payload of the strategiesBySegment endpoint when the
flag is active. In addition to returning just the strategies, the object
will also contain a new property, called `changeRequestStrategies`
containing the strategies that are used in change requests.

This PR does not update the schema. That can be done later when the
changes go into beta. This also allows us some time to iterate on the
payload without changing the public API.

## Discussion points:

Should `strategies` and `changeRequestStrategies` ever contain
duplicates? Take this scenario:
- Strategy S uses segment T.
- There is an open change request that updates the list of segments for
S to T and a new segment U.
- In this case, strategy S would show up both in `strategies` _and_ in
`changeRequestStrategies`.

We have two options: 
1. Filter the list of change request strategies, so that they don't
contain any duplicates (this is currently how it's implemented)
2. Ignore the duplicates and just send both lists as is.

We're doing option 2 for now.
2023-11-22 07:51:04 +01:00
Gastón Fournier
7ddcceed8a
fix: remove user from project (#5383)
Removing a user from a project was impossible if you only had 1 owner.
It worked fine when having more than an owner. This should fix it and
we'll add tests later
2023-11-21 15:44:12 +01:00
Jaanus Sellin
1429b54957
feat: sorting by last seen, environments now working properly (#5376)
Now calculates final ranks also, if there are some ranks missing from
duplicates.
2023-11-21 15:19:06 +02:00