1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-10 17:53:36 +02:00
unleash.unleash/src/lib/util
Thomas Heartman 98a6cd05c6
Feat(#1873): return 'unknown' for application hostname strategies (#1889)
The hostname strategy will not work correctly with the playground because it depends on external state. In its constructor, it tries to query the environment or use the os.hostname function to determine what its current hostname is. This means that no matter what the user does in the playground, they can’t affect the results of this strategy. It’s also unlikely that it will be true. And if it is, it probably won’t be true for their clients.

In theory, we could accept a hostname property on the Unleash context and use the provided hostname in the address. However, I’m afraid that it’ll make users think that they can impact the hostname strategy by setting the property on their context, when that doesn’t do anything outside of the playground. It would also make the playground evaluate things differently from a regular SDK and I’m not sure that that’s something we want.

Instead, this change to the API makes the feature evaluate to 'unknown' or `false` (depending on constraints).
2022-08-05 11:09:55 +02:00
..
feature-evaluator Feat(#1873): return 'unknown' for application hostname strategies (#1889) 2022-08-05 11:09:55 +02:00
validators refactor: avoid inlining segments for supported clients (#1640) 2022-06-02 14:07:46 +02:00
anonymise.ts fix: add flag to annomise event log 2022-05-30 21:01:46 +02:00
arraysHaveSameItems.test.ts fix: require equal environments when moving toggles (#1595) 2022-05-18 11:07:01 +02:00
arraysHaveSameItems.ts fix: require equal environments when moving toggles (#1595) 2022-05-18 11:07:01 +02:00
collect-ids.ts feat: add segments (#1426) 2022-03-29 14:59:14 +02:00
constants.ts fix: Issue #1444 - API import with drop=true deletes existing client keys (#1668) 2022-06-09 15:56:13 +01:00
ensureStringValue.test.ts fix: ensure that param values from /api/admin/features are strings (#1761) 2022-06-29 10:11:34 +02:00
ensureStringValue.ts fix: ensure that param values from /api/admin/features are strings (#1761) 2022-06-29 10:11:34 +02:00
env.test.ts refactor: move segment limits to env vars (#1642) 2022-06-02 10:44:45 +02:00
env.ts refactor: move segment limits to env vars (#1642) 2022-06-02 10:44:45 +02:00
extract-user.ts
format-base-uri.test.ts
format-base-uri.ts
graceful-shutdown.ts Feat/api key scoping (#941) 2021-09-15 20:28:10 +02:00
is-email.ts
isDefined.test.ts refactor: add schemas to user admin controller (#1692) 2022-06-22 14:55:43 +02:00
isDefined.ts refactor: add schemas to user admin controller (#1692) 2022-06-22 14:55:43 +02:00
load-index-html.ts task: Use make-fetch-happen (#1500) 2022-04-28 10:57:52 +02:00
map-values.test.ts refactor: add soft response schema validation (#1657) 2022-06-08 08:01:14 +02:00
map-values.ts refactor: add soft response schema validation (#1657) 2022-06-08 08:01:14 +02:00
metrics-helper.ts
offline-unleash-client.test.ts Feat(#1873): return 'unknown' for application hostname strategies (#1889) 2022-08-05 11:09:55 +02:00
offline-unleash-client.ts feat(#1873/playground): Return detailed information on feature toggle evaluation (#1839) 2022-08-04 15:41:52 +02:00
omit-keys.test.ts refactor: add soft response schema validation (#1657) 2022-06-08 08:01:14 +02:00
omit-keys.ts refactor: add soft response schema validation (#1657) 2022-06-08 08:01:14 +02:00
random-id.ts feat: add segments (#1426) 2022-03-29 14:59:14 +02:00
rewriteHTML.test.ts refactor: use static as the asset dir name (#1586) 2022-05-10 15:47:54 +02:00
rewriteHTML.ts refactor: use static as the asset dir name (#1586) 2022-05-10 15:47:54 +02:00
segments.ts refactor: move segment limits to env vars (#1642) 2022-06-02 10:44:45 +02:00
semver.test.ts refactor: avoid inlining segments for supported clients (#1640) 2022-06-02 14:07:46 +02:00
semver.ts refactor: avoid inlining segments for supported clients (#1640) 2022-06-02 14:07:46 +02:00
snakeCase.test.ts
snakeCase.ts
timer.test.ts
timer.ts
validateJsonString.test.ts fix: when payload type is 'json' validate value on toggle variable validation (#1704) 2022-06-14 13:08:38 +02:00
validateJsonString.ts fix: when payload type is 'json' validate value on toggle variable validation (#1704) 2022-06-14 13:08:38 +02:00
version.ts