Skip to content

Commit

Permalink
Merge branch 'main' into cjux-278
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymek authored Dec 9, 2024
2 parents 9716ff0 + d85c4d5 commit aeae98a
Show file tree
Hide file tree
Showing 86 changed files with 3,021 additions and 1,769 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.18.0
20.18.1
614 changes: 307 additions & 307 deletions .yarn/releases/yarn-4.5.1.cjs → .yarn/releases/yarn-4.5.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.1.cjs
yarnPath: .yarn/releases/yarn-4.5.3.cjs
495 changes: 495 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_VERSION=20.18.0-alpine
ARG NODE_VERSION=20.18.1-alpine

FROM node:$NODE_VERSION AS builder

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Check out [the CONTRIBUTING.md file](./CONTRIBUTING.md) for contribution guideli
- [Audit logs](https://docs.getunleash.io/advanced/audit_log)
- Enforce [OWASP's secure headers](https://owasp.org/www-project-secure-headers/) via the strict HTTPS-only mode
- Flexible hosting options: host it on premise or in the cloud (_any_ cloud)
- Scale [the Unleash Proxy](https://docs.getunleash.io/reference/unleash-proxy) independently of the Unleash server to support any number of front-end clients without overloading your Unleash instance
- Scale with [Unleash Edge](https://docs.getunleash.io/reference/unleash-edge) independently of the Unleash server to support any number of front-end clients without overloading your Unleash instance

### Looking for more features?

Expand All @@ -174,7 +174,7 @@ If you're looking for one of the following features, please take a look at our [

## Architecture

<img src="./website/static/img/unleash-architecture.svg" title="Unleash System Overview" />
<img src="./website/static/img/unleash-architecture-edge.png" title="Unleash System Overview" />

Read more in the [_system overview_ section of the Unleash documentation](https://docs.getunleash.io/understanding-unleash/unleash-overview#system-overview).

Expand All @@ -197,7 +197,7 @@ To connect your application to Unleash you'll need to use a client SDK for your

**Official front-end SDKs:**

The front-end SDKs connect via the [Unleash Proxy](https://docs.getunleash.io/reference/unleash-proxy) in order to ensure privacy, scalability and security.
The front-end SDKs connect via [Unleash Edge](https://docs.getunleash.io/reference/unleash-edge) in order to ensure privacy, scalability and security.

- [Android Proxy SDK](https://docs.getunleash.io/reference/sdks/android-proxy)
- [Flutter Proxy SDK](https://docs.getunleash.io/reference/sdks/flutter)
Expand Down
2 changes: 1 addition & 1 deletion docker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
"semver": "^7.5.3"
},
"version": "6.0.1",
"packageManager": "[email protected].1"
"packageManager": "[email protected].3"
}
10 changes: 5 additions & 5 deletions docker/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -768,13 +768,13 @@ __metadata:
linkType: hard

"cross-spawn@npm:^7.0.0":
version: 7.0.3
resolution: "cross-spawn@npm:7.0.3"
version: 7.0.6
resolution: "cross-spawn@npm:7.0.6"
dependencies:
path-key: "npm:^3.1.0"
shebang-command: "npm:^2.0.0"
which: "npm:^2.0.1"
checksum: 10c0/5738c312387081c98d69c98e105b6327b069197f864a60593245d64c8089c8a0a744e16349281210d56835bb9274130d825a78b2ad6853ca13cfbeffc0c31750
checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1
languageName: node
linkType: hard

Expand Down Expand Up @@ -3626,7 +3626,7 @@ __metadata:

"unleash-server@file:../build::locator=unleash-docker%40workspace%3A.":
version: 6.2.2
resolution: "unleash-server@file:../build#../build::hash=c676ea&locator=unleash-docker%40workspace%3A."
resolution: "unleash-server@file:../build#../build::hash=6d0c93&locator=unleash-docker%40workspace%3A."
dependencies:
"@slack/web-api": "npm:^6.10.0"
"@wesleytodd/openapi": "npm:^1.1.0"
Expand Down Expand Up @@ -3688,7 +3688,7 @@ __metadata:
type-is: "npm:^1.6.18"
unleash-client: "npm:6.1.1"
uuid: "npm:^9.0.0"
checksum: 10c0/7f6e6a442a6ecaabd9d85b85a2a8200ed12c8c1a140ed96fd77f2391cbbd7b3eb38f1d46c5c6d131519e5c21e645928441357c525f1b30924b3aa5efbe4de7cf
checksum: 10c0/e2a78ddcf63f7265a148e46decb2c2d85aa38031a75ae61df76f15a40021e7243ebaa1d5dd013a4efd2134a5cb08935acc8194c41810fa576714a87c2f32bf1d
languageName: node
linkType: hard

Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.5.1.cjs
yarnPath: .yarn/releases/yarn-4.5.3.cjs
12 changes: 6 additions & 6 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"@types/uuid": "^9.0.0",
"@uiw/codemirror-theme-duotone": "4.23.6",
"@uiw/react-codemirror": "4.23.6",
"@vitejs/plugin-react": "4.3.3",
"@vitejs/plugin-react": "4.3.4",
"cartesian": "^1.0.1",
"chart.js": "3.9.1",
"chartjs-adapter-date-fns": "3.0.0",
Expand All @@ -77,7 +77,7 @@
"copy-to-clipboard": "3.3.3",
"countries-and-timezones": "^3.4.0",
"css-mediaquery": "^0.1.2",
"cypress": "13.15.2",
"cypress": "13.16.0",
"cypress-vite": "^1.4.0",
"date-fns": "2.30.0",
"date-fns-tz": "^2.0.0",
Expand All @@ -93,7 +93,7 @@
"lodash.mapvalues": "^4.6.0",
"lodash.omit": "4.5.0",
"millify": "^6.0.0",
"msw": "2.6.4",
"msw": "2.6.6",
"orval": "^6.31.0",
"pkginfo": "0.4.1",
"plausible-tracker": "0.3.9",
Expand All @@ -112,7 +112,7 @@
"react-router-dom": "6.16.0",
"react-table": "7.8.0",
"react-test-renderer": "18.3.1",
"sass": "1.80.6",
"sass": "1.81.0",
"semver": "7.6.3",
"swr": "2.2.5",
"tss-react": "4.9.13",
Expand All @@ -129,7 +129,7 @@
"resolutions": {
"@codemirror/state": "6.4.1",
"@xmldom/xmldom": "^0.9.0",
"jsonpath-plus": "10.1.0",
"jsonpath-plus": "10.2.0",
"json5": "^2.2.2",
"vite": "5.4.11",
"semver": "7.6.3",
Expand All @@ -155,7 +155,7 @@
"last 1 safari version"
]
},
"packageManager": "[email protected].1",
"packageManager": "[email protected].3",
"dependencies": {
"json-2-csv": "^5.5.5"
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/component/admin/auth/OidcAuth/OidcAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ export const OidcAuth = () => {
>
documentation
</a>{' '}
to learn how to integrate with specific Open Id Connect
providers (Okta, Keycloak, Google, etc). <br />
to learn how to integrate with specific OpenID Connect
providers (such as Okta and Keycloak). <br />
Callback URL:{' '}
<code>{uiConfig.unleashUrl}/auth/oidc/callback</code>
</Alert>
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/component/admin/auth/SamlAuth/SamlAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ export const SamlAuth = () => {
documentation
</a>{' '}
to learn how to integrate with specific SAML 2.0
providers (Okta, Keycloak, etc). <br />
providers (such as Okta, Keycloak, and Microsoft Entra
ID). <br />
Callback URL:{' '}
<code>{uiConfig.unleashUrl}/auth/saml/callback</code>
</Alert>
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/component/admin/auth/SsoGroupSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ export const SsoGroupSettings = ({
<strong>Enable Group Syncing</strong>
<p>
Enables automatically syncing of users from the{' '}
{ssoType}
provider when a user logs in.
{ssoType} provider when a user logs in.
</p>
</Grid>
<Grid item md={6} style={{ padding: '20px' }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const LicensedUsersBox = () => {
</TopRow>

<StyledCaption>
<span>Seats used in the last 30 days</span>
<span>Seats used over the last 30 days</span>
<OpenSidebarButton />
</StyledCaption>
</Figure>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const LicensedUsersChart: FC<ILicensedUsersChartProps> = ({
const data = {
datasets: [
{
label: 'Licensed users',
label: 'Seats used',
data: licensedUsers,
borderColor: theme.palette.primary.main,
backgroundColor: theme.palette.primary.main,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const LicensedUsersSidebar = ({
{data.seatCount}
</Typography>
<Typography variant='body2'>
Used seats last 30 days
Seats used over the last 30 days
</Typography>
</LicenceBox>
<Alert severity='info'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type React from 'react';
import type { VFC, FC, ReactNode } from 'react';
import type { FC, ReactNode } from 'react';
import { Box, styled, Typography } from '@mui/material';
import type {
ChangeRequestState,
Expand Down Expand Up @@ -52,12 +52,15 @@ const SegmentContainer = styled(Box, {
borderRadius: `0 0 ${theme.shape.borderRadiusLarge}px ${theme.shape.borderRadiusLarge}px`,
}));

export const SegmentChangeDetails: VFC<{
export const SegmentChangeDetails: FC<{
actions?: ReactNode;
change: IChangeRequestUpdateSegment | IChangeRequestDeleteSegment;
changeRequestState: ChangeRequestState;
}> = ({ actions, change, changeRequestState }) => {
const { segment: currentSegment } = useSegment(change.payload.id);
const snapshotSegment = change.payload.snapshot;
const referenceSegment =
changeRequestState === 'Applied' ? snapshotSegment : currentSegment;

return (
<SegmentContainer conflict={change.conflict}>
Expand Down Expand Up @@ -97,7 +100,7 @@ export const SegmentChangeDetails: VFC<{
<SegmentTooltipLink change={change}>
<SegmentDiff
change={change}
currentSegment={currentSegment}
currentSegment={referenceSegment}
/>
</SegmentTooltipLink>
</ChangeItemInfo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,87 @@ test('Deleting strategy after change request is applied diffs against the snapsh
await screen.findByText('Deleting strategy variants:');
await screen.findByText('snapshot_variant');
});

test('Adding strategy always diffs against undefined strategy', async () => {
render(
<Routes>
<Route
path='/projects/:projectId'
element={
<StrategyChange
featureName={feature}
environmentName={environmentName}
projectId={projectId}
changeRequestState='Approved'
change={{
action: 'addStrategy',
id: 1,
payload: {
...strategy,
variants: [
{
name: 'change_variant',
weight: 1000,
stickiness: 'default',
weightType: 'variable' as const,
},
],
title: 'change_request_title',
parameters: {
...strategy.parameters,
rollout: changeRequestRollout,
},
},
}}
/>
}
/>
</Routes>,
{ route: `/projects/${projectId}` },
);

await screen.findByText('+ Adding strategy:');
await screen.findByText('change_request_title');

const viewDiff = await screen.findByText('View Diff');
await userEvent.hover(viewDiff);
await screen.findByText(`+ name: "flexibleRollout"`);

await screen.findByText('Setting strategy variants to:');
await screen.findByText('change_variant');
});

test('Segments order does not matter for diff calculation', async () => {
render(
<Routes>
<Route
path='/projects/:projectId'
element={
<StrategyChange
featureName={feature}
environmentName={environmentName}
projectId={projectId}
changeRequestState='Applied'
change={{
action: 'updateStrategy',
id: 1,
payload: {
...strategy,
segments: [3, 2, 1],
snapshot: {
...strategy,
segments: [1, 2, 3],
},
},
}}
/>
}
/>
</Routes>,
{ route: `/projects/${projectId}` },
);

const viewDiff = await screen.findByText('View Diff');
await userEvent.hover(viewDiff);
await screen.findByText('(no changes)');
});
Loading

0 comments on commit aeae98a

Please sign in to comment.