1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-13 13:48:59 +02:00
Commit Graph

14102 Commits

Author SHA1 Message Date
Thomas Heartman
7988abdeef correctly add the type 2025-07-16 11:25:11 +02:00
Thomas Heartman
6a595a853c revert new type 2025-07-16 11:22:28 +02:00
Thomas Heartman
c4fca8a953 allow sdkversion in iclientapp 2025-07-16 11:21:16 +02:00
Thomas Heartman
728b0eb28c Add type to method 2025-07-16 11:14:19 +02:00
Thomas Heartman
a95593aa88 pick specific columns 2025-07-16 11:14:08 +02:00
Thomas Heartman
b95fc76aba don't use the old metrics schema 2025-07-16 11:13:46 +02:00
Thomas Heartman
7e46ec9e47 Add tests for instance service updates 2025-07-16 11:13:30 +02:00
Thomas Heartman
a6c02222f1 fix issues 2025-07-15 15:48:07 +02:00
Thomas Heartman
2784c74f90 remove properties we don't use 2025-07-15 12:01:14 +02:00
Thomas Heartman
5e6fd733bf Deprecate properties of the application schema that we don't use. 2025-07-15 11:59:31 +02:00
Nuno Góis
7910aa9130
chore: add flag paygInstanceStatsEvents (#10356)
https://linear.app/unleash/issue/2-3697/add-flag-payginstancestatsevents

Adds a new flag: `paygInstanceStatsEvents`

This controls sending the daily PAYG instance stats events.
2025-07-15 09:35:55 +01:00
Nuno Góis
3d78fbea7f
chore: prevent unknown flag deadlocks by sorting and batching inserts (#10348)
https://linear.app/unleash/issue/2-3692/prevent-deadlocks-by-sorting-and-batching-inserts

Tries to prevent deadlocks by sorting and batching unknown flag inserts
when flushing.
2025-07-15 08:58:42 +01:00
Mateusz Kwasniewski
998834245c
feat: Using impact metrics with flags (#10355) 2025-07-15 08:42:38 +02:00
Thomas Heartman
34feef990e
chore: Export IClientInstance from server-impl. (#10354)
This type wasn't available in enterprise, so I'm adding it to serer-impl
to make it available.

I was a little unsure whether this would be an implementation detail
that we shouldn't expose in server-impl, but comparing it with the other
things we export (`applyGenericQueryParams`, `flattenPayload`,
`basePaginationParameters`), that seems to be fine. I'm guessing this
isn't the main public export? Or it is, and we just don't care 🤷
2025-07-14 15:36:18 +02:00
Nuno Góis
e51b3bb6c2
chore: allow bulk metrics with empty flag names (#10353)
https://linear.app/unleash/issue/2-3695/allow-empty-flag-names-to-be-reported-in-bulk-metrics

Accepts metrics with empty flag names in the `/api/client/metrics/bulk`
endpoint.

When testing unknown flags through Edge, which uses the `/bulk`
endpoint, we noticed that there's a slight difference in validation
behavior compared to the regular metrics endpoint. While the regular
endpoint allows empty flag names, this one does not.

We can argue that we don't care about empty flag names in the first
place, which is true, but this inconsistency between the metric
endpoints can be confusing, and it also means that a single empty flag
name evaluation would break metrics being reported for that entire Edge
instance, for example.

This way we still accept it, just like we currently do if we point to
Unleash directly instead of going through Edge.

**Note**: We noticed that, due to the slightly different logic branch,
the bulk metrics endpoint does not report unknown flags. We'll take a
look at this at a later point.
2025-07-14 14:30:06 +01:00
Mateusz Kwasniewski
187d24db1f
chore: impact metrics resolver signature update (#10352) 2025-07-14 13:16:25 +02:00
Thomas Heartman
ed9eccd743
chore: add application_created event type (#10351)
This is primarily to facilitate reading and processing these events in
the payg cloud section of Unleash. We only emit these in one place, so I
added the types in there.
2025-07-14 11:02:29 +00:00
Mateusz Kwasniewski
ca485959b0
feat: prefix unleash impact metrics labels (#10350) 2025-07-14 11:47:45 +02:00
Mateusz Kwasniewski
fe471419b4
chore: bump node sdk with impact metrics flags (#10349) 2025-07-14 09:50:41 +02:00
Melinda Fekete
46f7031854
Fix linting in docs sidebar (#10347)
Fix linting in docs
2025-07-11 15:03:12 +02:00
unleash-bot[bot]
96f59bccfa
chore(AI): healthToTechDebt flag cleanup (#10346)
Co-authored-by: unleash-bot <194219037+unleash-bot[bot]@users.noreply.github.com>
Co-authored-by: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com>
2025-07-11 14:15:55 +02:00
Melinda Fekete
cae5be4ad0
docs: update docs navigation (#9942) 2025-07-11 13:33:11 +02:00
Saulius Astromskis
64f7004721
chore: reduced log level of metrics log statements (#10343)
## About the changes
Reducing the log level of metrics log statements.
2025-07-11 11:55:54 +03:00
Tymoteusz Czech
1948861a46
Update impact metrics state (#10342) 2025-07-11 10:46:20 +02:00
Tymoteusz Czech
69905185c5
Impact metrics errors with rate per second option (#10337)
- checkbox to select 'rate' vs 'increase' - always available for now,
but does nothing for gauge. I can improve it later on
- better preview - it will show resolved query underneath
- cleaner error handling that doesn't overflow widgets
2025-07-10 16:43:55 +02:00
Mateusz Kwasniewski
ada4431957
fix: token parsing (#10341) 2025-07-10 14:28:37 +00:00
Mateusz Kwasniewski
5fd7d07741
chore: node sdk with impact metrics env changes (#10340) 2025-07-10 14:05:09 +02:00
Thomas Heartman
d5ecf04043
chore: remove unused method (#10335)
I found this method when running through the environment store that has
0 references. I also can't find any references to it in enterprise and
it's not in the interface. I think it's safe to remove.
2025-07-10 12:07:36 +02:00
Mateusz Kwasniewski
eb80f00206
feat: user friendly impact metric name (#10338) 2025-07-10 11:27:37 +02:00
Thomas Heartman
e27bd74dcc
chore: Add PAYG trial events flag to Unleash (#10336)
Pretty much what it says on the tin: add PAYG trial events flag to
control the upcoming trial events
2025-07-09 14:56:01 +01:00
Mateusz Kwasniewski
3ea30eb7a1
feat: impact metrics total requests (#10334) 2025-07-09 14:45:51 +02:00
Gastón Fournier
902845bf82
chore: amend user-created-missing events (#10333)
## About the changes
Users could have been created in Unleash without a corresponding event
(a.k.a. audit log), due to a non transactional user insert
([fix](https://github.com/Unleash/unleash/pull/10327)). This could have
happened because of providing the wrong role id or some other causes
we're not aware of.

This amends the situation by inserting an event for each user that
exists in the instance (not deleted) and doesn't have it's corresponding
user-created event.

The event is inserted as already announced because this happened in the
past.

The event log will look like this (simulated the situation in local
dev):
```json
{
  "id": 11,
  "type": "user-created",
  "createdBy": "unleash_system_user",
  "createdAt": "2025-07-08T16:06:17.428Z",
  "createdByUserId": null,
  "data": {
    "id": "6",
    "email": "xyz@three.com"
  },
  "preData": null,
  "tags": [],
  "featureName": null,
  "project": null,
  "environment": null,
  "label": "User created",
  "summary": "**unleash_system_user** created user ****"
}
```

The main problem is we can't create the event in the past, so this will
have to do it
2025-07-09 07:19:25 +00:00
Mateusz Kwasniewski
d7be47609d
feat: prefix impact metrics with unleash and type (#10331) 2025-07-09 09:09:44 +02:00
Nuno Góis
3b6613360c
chore: unknown flags UI (#10332)
https://linear.app/unleash/issue/2-3682/add-unknown-flags-page-with-table-and-description

Adds a `/unknown-flags` page with a table of unknown flag reports and a
short description of what this is.

It’s only accessible via direct URL for now (if the flag is enabled),
but it allows us to share the list with some customers.

<img width="1026" alt="image"
src="https://github.com/user-attachments/assets/feee88bb-bbce-4871-98d7-f76f95076ee2"
/>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-08 17:51:03 +01:00
Mateusz Kwasniewski
9d2df8aa75
chore: Export impact register (#10330) 2025-07-08 13:39:04 +02:00
Mateusz Kwasniewski
925724ca92
chore: expose impact register (#10329) 2025-07-08 13:13:09 +02:00
Tymoteusz Czech
1eefede62e
Improve impact metrics layout (#10326)
- narrow screen no longer breaks
- fixed size of series indicators in tooltips
- simplified grid layout props
- updated X axis ticks
2025-07-08 12:28:04 +02:00
Gastón Fournier
2d83f297a1
fix: make user creation transactional (#10327)
## About the changes
When inserting a user with an invalid role id, the user creation will
succeed but there will be no record in the audit log.

The API call returns a 400 misleading you to believe the user was not
created, but it actually was.

This makes the whole user creation transactional, so if something fails,
data will be in the right state.

## Testing
The e2e test was split in 2 scenarios, one with smtp and another one
without.

This test was added, and it was failing before adding the transaction,
because when fetching the users, the user was there, despite having
returned a 400 error in the API call:

80a2e65b6f/src/test/e2e/api/admin/user-admin.e2e.test.ts (L181-L204)
2025-07-08 10:17:16 +00:00
Nuno Góis
43a6166673
chore: unknown flags with environment (#10325)
https://linear.app/unleash/issue/2-3681/add-environment-to-unknown-flag-reports

This does a few things:
 - Adds environment to our unknown flag reports
 - Increases our max unknown flag reports from 10 to 100
 - Reduces our clean up interval from 24 to 2 hours
- Flattens our response (easier to get started with and display in a
table, we can later decide if we want to group this data)

<img width="496" alt="image"
src="https://github.com/user-attachments/assets/11350639-9f7f-4011-8b39-b135c820ca21"
/>
2025-07-08 10:56:33 +01:00
Thomas Heartman
e2853acf15
Remove uses of one of / use operator checks instead (#10328)
Updates a few remaining places where we check constraint operators with
the new constraint operator checks. Additionally, because there was only
one remaining place where we used the `oneOf` function, I replaced it
with a normal `includes` check and deleted the `oneOf` util. From what I
can tell, there's no need to have that utility function; it doesn't
provide much benefit over using the language built-ins 🤷🏼
2025-07-08 11:10:45 +02:00
David Leek
068ef585be
feat: move apply button to a separate section (#10324) 2025-07-08 09:23:48 +02:00
Gastón Fournier
59990fb503
fix: link checker for unido.org (#10323)
These links work but they've been responding with 403 for a long time
2025-07-07 15:25:34 +02:00
Gastón Fournier
5901475c9e
fix: audit scim user deleted events (#10322)
SCIM users deleted in bulk are not captured in the event log. We just
add an event like this:

![image](https://github.com/user-attachments/assets/2d7078b2-61d6-475e-8151-63b5b5ed7449)

This prevents partial user sync because we don't get an event when the
user was deleted.
2025-07-07 12:17:37 +02:00
Melinda Fekete
f7e39df386
Update Quickstart guide with cloud-hosted trial (#10318) 2025-07-07 11:17:10 +02:00
Gastón Fournier
f9b1d70694
fix: coverage (#10321)
Small fix, missing `build:` prefix
2025-07-07 11:14:39 +02:00
Tymoteusz Czech
965e817d79
fix: health to technical debt flag (#10320)
Flag was now working properly because of our flag resolver
2025-07-07 10:41:58 +02:00
Tymoteusz Czech
0247561f9d
update 'config' icon (#10319) 2025-07-07 10:41:43 +02:00
Tymoteusz Czech
212c538a75
fix: health-technical debt trends in emails (#10308) 2025-07-04 16:46:59 +02:00
Thomas Heartman
cb4beb71ac
Chore(1 3895)/small input tweaks (#10316)
Doesn't clear the value from the constraint input value popover if you
close it and then re-open. In other words, if you accidentally click
out, you don't lose your progress. Instead, the popover will open again,
with the value you had when you closed it highlighted (so that it's easy
to type over if you want to):

<img width="452" alt="image"
src="https://github.com/user-attachments/assets/d86aa00e-4956-40a8-8fea-e75be5d5425b"
/>

The reason I'm changing this now is because I noticed that the error
wasn't cleared correctly when the popover was closed. If we do it this
way instead, then that makes sense, because you can still see the value.
This is also how the single-value popover has worked forever.

From some quick testing, the single value popover still works as
expected:
<img width="562" alt="image"
src="https://github.com/user-attachments/assets/9041a922-b055-4310-ab60-93ad219981a4"
/>


As a side note: I'm adding a comment to anyone coming after as to why
focus handling on escape doesn't work correctly on the single value
button. I was about to go down a rabbit hole on that before I read my
own comment on the previous PR. So I thought I'd put that here too.
2025-07-04 14:57:52 +02:00
Thomas Heartman
37aaf60aa5
feat(1-3873)/warn you when adding existing values (#10310)
Makes it so that the constraint value input gives you an error if you
try to add one or more values that **all** exist in the set of values
already. E.g. if you have `a` and `b`, and try to add `a`, it'll tell
you that "`a` has already been added". Likewise, if you try to add
`a,b`, it'll tell you that all these values already exist. However, if
at least one of the values does not exist, then it will allow you to
submit the values (we already do deduplication before storing anyway).

The background for this is that a user was confused thinking that just
one specific value didn't get added to their constraints. As it turns
out, they'd already added the value previously, so when it didn't show
up at the end of the list, they thought it didn't work at all.

<img width="863" alt="image"
src="https://github.com/user-attachments/assets/12195e0a-04bc-4b41-bd44-432120c768a6"
/>

<img width="816" alt="image"
src="https://github.com/user-attachments/assets/433a64d7-aec0-482d-8544-574656c266ce"
/>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-04 12:18:02 +00:00