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

2587 Commits

Author SHA1 Message Date
Tymoteusz Czech
4bb80d2bff
cors setup - backend 2024-12-19 19:39:24 +01:00
Tymoteusz Czech
f8a62efa72
feat: read logs and update cors maintenance root-role permissions 2024-12-19 18:42:36 +01:00
Christopher Kolstad
66907bfd8e
feat: only display oss included projects/environments when install is oss (#8896)
Trying again, now with a tested function for resolvingIsOss.

Still want to test this on a pro instance in sandbox before we deploy
this to our customers to avoid what happened Friday.

---------

Co-authored-by: Gastón Fournier <gaston@getunleash.io>
2024-12-19 14:33:54 +01:00
Jaanus Sellin
b701fec75d
feat: store memory footprints to grafana (#9001)
When there is new revision, we will start storing memory footprint for
old client-api and the new delta-api.
We will be sending it as prometheus metrics.

The memory size will only be recalculated if revision changes, which
does not happen very often.
2024-12-19 13:15:30 +02:00
Melinda Fekete
c8300fed00
Simplify Unleash docs updates (#8925) 2024-12-17 14:36:16 +01:00
Jaanus Sellin
fdb20e94e1
chore: rename to seats used (#8993)
Instead of licensed users/used, we will use seats used.
2024-12-17 12:39:54 +02:00
Tymoteusz Czech
4fb5f6a96c
migration: add auth config permission (#8988)
after https://github.com/Unleash/unleash/pull/8987
2024-12-17 10:33:14 +01:00
Tymoteusz Czech
9b15343a79
feat: authentication configuration permission (#8987)
New permission for SSO config.
2024-12-17 10:16:24 +01:00
Jaanus Sellin
138ba35d7a
feat: segment delta (#8990)
Now the delta endpoint also always returns all the segments.
2024-12-17 10:56:09 +02:00
Jaanus Sellin
3696420c51
chore: rebrand cache to delta (#8986)
The cache is too generic, we will be using delta from now on.
2024-12-16 12:51:03 +02:00
Jaanus Sellin
a2f82716d1
fix: now null sdks will also be handled nicely (#8984)
We had some error logs, that when SDK is null, then the application
overview query was failing.

This solves it
2024-12-16 12:11:48 +02:00
Fredrik Strand Oseberg
39ca516823
feat: add prom metrics (#8980)
This PR adds prometheus metrics that allows us to see whether or not
tags and namePrefix is used at all in our cloud offering.
2024-12-16 10:48:33 +01:00
Gastón Fournier
b1cced77c2
fix: can't sort on undefined sdks (#8982)
## About the changes
According to some logs, sdks can be undefined:
```
TypeError: Cannot read properties of null (reading 'sort')\n    at /unleash/node_modules/unleash-server/dist/lib/db/client-applications-store.js:330:22\n 
```
2024-12-16 10:12:21 +01:00
Jaanus Sellin
eb0699ca03
feat: move delta controller to new path (#8981)
Feature delta is now at api//client/delta
2024-12-16 08:46:15 +02:00
Jaanus Sellin
a257ca4474
feat: deleted feature names should come from event (#8978)
This is still raw and experimental.
We started to pull deleted features from event payload.
Now we put full query towards read model.

Co-Author:  @FredrikOseberg
2024-12-13 14:54:15 +02:00
Fredrik Strand Oseberg
b2cf0e4e6b
Feat/refactor polling (#8976)
This PR refactors the method that listens on revision changes:
- Now supports all environments
- Removed unnecessary populate cache method

# Discussion point

In the listen method, should we implement logic to look into which
environments the events touched? By doing this we would:
- Reduce cache size
- Save some memory/CPU if the environment is not initialized in the
cache, because we could skip the DB calls.
2024-12-13 11:25:37 +02:00
Jaanus Sellin
63d2359dec
feat: new read model for client feature toggle cache (#8975)
This is based on the exising client feature toggle store, but some
alterations.

1. We support all of the querying it did before.
2. Added support to filter by **featureNames**
3. Simplified logic, so we do not have admin API logic
- no return of tags
- no return of last seen
- no return of favorites
- no playground logic


Next PR will try to include the revision ID.
2024-12-13 10:23:46 +02:00
Fredrik Strand Oseberg
8eb84e9645
fix: initialize cache when we get the first request (#8971)
This PR changes the caching functionality so that we initialize the
cache when we receive the first request instead of frontloading the
caches.
2024-12-13 08:39:40 +01:00
Tymoteusz Czech
67864e7008
migration: add permissions for instance maintenance (#8885)
after #8875
2024-12-12 16:53:46 +01:00
Jaanus Sellin
c0925ea75c
fix: do not initialize cache when flag is off (#8969)
This feature is still in early alpha. We do not want to populate any
cache on startup. We might not want to do it ever.
2024-12-12 15:06:33 +02:00
Jaanus Sellin
59bdfcd84b
feat: first revision of delta api (#8967)
This is not changing existing logic.
We are creating a new endpoint, which is guarded behind a flag.

---------

Co-authored-by: Simon Hornby <liquidwicked64@gmail.com>
Co-authored-by: FredrikOseberg <fredrik.no@gmail.com>
2024-12-12 14:18:11 +02:00
Mateusz Kwasniewski
fe8308da1f
feat: productivity email action text (#8966) 2024-12-12 12:00:08 +01:00
Fredrik Strand Oseberg
7c646bc523
Chore/increase client api test coverage (#8950)
Added more tests around specific plans. Also added snapshot as per our
conversation @gastonfournier, but I'm unsure how much value it will give
because it seems that the tests should already catch this using
respondWithValidation and the OpenAPI schema. The problem here is that
empty array is a valid state, so there were no reason for the schema to
break the tests.
2024-12-12 11:42:18 +01:00
Mateusz Kwasniewski
37a3ec9599
fix: productivity report small screens (#8963) 2024-12-12 09:21:55 +01:00
Jaanus Sellin
17d3b5c2fb
fix: make project ui query optimized (#8961)
From 13 seconds to 0.1 seconds.

1. Joining 1 million events to projects/features is slow. **Solved by
using CTE.**
2. Running grouping on 1 million rows is slow. **Solved by adding
index.**
2024-12-12 08:41:10 +02:00
Mateusz Kwasniewski
a1f147dfef
fix: move productivity report to features dir (#8960) 2024-12-11 12:06:50 +01:00
Mateusz Kwasniewski
48b21591f6
feat: productivity report trends visualization (#8956) 2024-12-11 11:19:08 +01:00
Melinda Fekete
311df82d37
Strategy docs updates (#8711)
- New navigation for Unleash Concepts
- Updated and restructured activation strategies and related concepts
2024-12-11 10:38:39 +01:00
gitar-bot[bot]
8c189cabd2
[Gitar] Cleaning up stale flag: purchaseAdditionalEnvironments with value false (#8955)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.ai)
This automated PR permanently removes the
`purchaseAdditionalEnvironments` feature flag.
  
  ---
This automated PR was generated by [Gitar](https://gitar.ai). View
[docs](https://gitar.ai/docs).

---------

Co-authored-by: Gitar <noreply@gitar.ai>
Co-authored-by: sjaanus <sellinjaanus@gmail.com>
2024-12-11 10:11:23 +02:00
Tymoteusz Czech
5cc0e589e8
feat(cjux-278): maintenance root roles (#8875)
Custom root roles for changing maintenance mode state and banners.

Internal ticket: CJUX-278
2024-12-10 15:22:46 +01:00
Mateusz Kwasniewski
9de96c8004
feat: OIDC redirect flag (#8944) 2024-12-10 09:07:00 +01:00
Mateusz Kwasniewski
23bdf0356a
feat: health rating color in email (#8943) 2024-12-09 15:44:16 +01:00
Mateusz Kwasniewski
4274bd6635
chore: view more insights color update (#8938) 2024-12-09 13:54:12 +01:00
Tymoteusz Czech
e8179d4dd2
feat(productivity-report): additional email headers test (#8540)
Test ability to add custom header to non-transactional email.
2024-12-09 11:33:25 +00:00
Mateusz Kwasniewski
d40b0795f9
feat: productivity report cta (#8936) 2024-12-09 12:32:50 +01:00
Mateusz Kwasniewski
c81d45b52c
chore: default metrics storage days updated (#8931) 2024-12-06 13:04:56 +01:00
Gastón Fournier
04eaf8d5bd
feat: add variant etag (#8922)
## About the changes
This adds a variant that allows us to control client refreshes in case
of need.
2024-12-05 15:13:11 +01:00
Nuno Góis
263aad4248
chore: streaming spike (#8907)
We need this PR to correctly set up CORS for streaming-related endpoints
in our spike and add the flag to our types.

---------

Co-authored-by: kwasniew <kwasniewski.mateusz@gmail.com>
2024-12-03 12:15:09 +00:00
Nuno Góis
c6668b411b
chore: improve release plan events and add them to event timeline (#8895)
https://linear.app/unleash/issue/2-3043/improve-release-plan-events-and-add-them-to-the-event-timeline

Improves release plan events and adds them to the event timeline.

This will break the events in Enterprise but that's okay, we can follow
up with the Enterprise PR to fix them.


![image](https://github.com/user-attachments/assets/862818a5-d9bf-4006-beca-786fd6265759)
2024-12-02 12:35:48 +00:00
Thomas Heartman
f833cf58eb
1-3060: remove features export import flag (#8890)
This PR removes all references to the `featuresExportImport` flag.

The flag was introduced in [PR
#3411](https://github.com/Unleash/unleash/pull/3411) on March 29th 2023,
and the flag was archived on April 3rd. The flag has always defaulted to
true.

We've looked at the project that introduced the flag and have spoken to CS about it: we can find no reason to keep the flag around. So well remove it now.
2024-12-02 09:26:06 +00:00
Nuno Góis
c9110224a5
chore: filter out milestone strategies in features_view (#8883)
https://linear.app/unleash/issue/2-3033/filter-out-release-plan-milestone-strategies-from-admin-feature

Filters out milestone strategies from our `features_view`.

This felt like the most elegant way to address this, since it seems we
only rely on this view to fetch the feature strategies in the admin UI.


### No more milestone strategies showing up on our UI when we have a
running milestone


![image](https://github.com/user-attachments/assets/02bac5a5-7ddb-4bde-b487-8b6bca0923b5)

### However they're still part of the client features response

```json
{
	"name": "r-plan",
	"type": "release",
	"enabled": false,
	"project": "default",
	"stale": false,
	"strategies": [
		{
			"name": "flexibleRollout",
			"constraints": [
				{
					"values": [
						"Portugal"
					],
					"inverted": false,
					"operator": "IN",
					"contextName": "country",
					"caseInsensitive": false
				},
				{
					"values": [
						"Portugal",
						"Norway"
					],
					"inverted": false,
					"operator": "IN",
					"contextName": "country",
					"caseInsensitive": false
				}
			],
			"parameters": {
				"groupId": "newOverview",
				"rollout": "100",
				"stickiness": "default"
			},
			"variants": [
				{
					"name": "A",
					"weight": 500,
					"stickiness": "default",
					"weightType": "variable"
				},
				{
					"name": "B",
					"weight": 500,
					"stickiness": "default",
					"weightType": "variable"
				}
			]
		},
		{
			"name": "flexibleRollout",
			"constraints": [],
			"parameters": {
				"groupId": "much_feature",
				"rollout": "25",
				"stickiness": "default"
			},
			"variants": []
		},
		{
			"name": "flexibleRollout",
			"constraints": [],
			"parameters": {
				"groupId": "r-plan",
				"rollout": "100",
				"stickiness": "default"
			},
			"variants": []
		}
	],
	"variants": [],
	"description": null,
	"impressionData": false
},
```
2024-12-02 08:17:17 +00:00
Jaanus Sellin
3c01813826
Revert "task: enabled in OSS." (#8892)
Reverts Unleash/unleash#8856
2024-11-29 13:42:10 +02:00
Christopher Kolstad
663b169c46
task: enabled in OSS. (#8856)
Hardcode project and environment names to filter by when OSS
2024-11-29 09:43:43 +01:00
sjaanus
0bee07ddec
chore: update texts 2024-11-28 13:48:07 +02:00
Mateusz Kwasniewski
61cb218d4d
fix: stop changing null to empty string when reading empty title (#8878) 2024-11-28 12:16:45 +01:00
David Leek
db02918a35
chore: make milestone_strategies.title nullable (#8864) 2024-11-27 09:16:24 +01:00
Jaanus Sellin
7906bfb177
chore: rename toggle to flag (#8854) 2024-11-26 09:57:43 +02:00
weekwith.me
d75c63b6e8
feat: Add PROJECT_ARCHIVED event to send message to Slack (#8848)
<!-- 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. -->

### Summary

- Add `PROJECT_ARCHIVED` event on `EVENT_MAP` to use
- Add a test case for `PROJECT_ARCHIVED` event formatting 
- Add `PROJECT_ARCHIVED` event when users choose which events they send
to Slack
- Fix Slack integration document by adding `PROJECT_ARCHIVED`

### Example

The example message looks like the image below. I covered my email with
a black rectangle to protect my privacy 😄
The link refers `/projects-archive` to see archived projects.

<img width="529" alt="Slack message example"
src="https://github.com/user-attachments/assets/938c639f-f04a-49af-9b4a-4632cdea9ca7">

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

I considered the reason why Unleash didn't implement to send
`PROJECT_ARCHIVED` message to Slack integration.

One thing I assumed that it is impossible to create a new project with
open source codes, which means it is only enabled in the enterprise
plan. However,
[document](https://docs.getunleash.io/reference/integrations/slack-app#events)
explains that users can send `PROJECT_CREATED` and `PROJECT_DELETED`
events to Slack, which are also available only in the enterprise plan,
hence it means we need to embrace all worthwhile events.

I think it is reasonable to add `PROJECT_ARCHIVED` event to Slack
integration because users, especially operators, need to track them
through Slack by separating steps, `_CREATED`, `_ARCHIVED`, and
`_DELETED`.
2024-11-25 14:33:50 +00:00
Christopher Kolstad
0f76a8a5a6
task: added unique index for release plan templates (#8846)
We want to prevent our users from defining multiple templates with the
same name. So this adds a unique index on the name column when
discriminator is template.
2024-11-25 11:25:55 +01:00
gitar-bot[bot]
9b4e646a98
[Gitar] Cleaning up stale flag: onboardingUI with value true (#8832)
[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.ai)
  This automated PR permanently enables the `onboardingUI` feature flag.
  
  ---
This automated PR was generated by [Gitar](https://gitar.ai). View
[docs](https://gitar.ai/docs).

---------

Co-authored-by: Gitar <noreply@gitar.ai>
2024-11-22 11:55:24 +02:00