From dc1d5ce4f2f3f126e0321c642d1edd5076c2d674 Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Thu, 14 Mar 2024 15:30:23 +0100 Subject: [PATCH] chore: update outdated sdks list (#6556) --- src/lib/features/metrics/instance/findOutdatedSdks.test.ts | 4 ++-- src/lib/features/metrics/instance/findOutdatedSdks.ts | 6 +++--- .../docs/contributing/ADRs/back-end/frontend-api-design.md | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/features/metrics/instance/findOutdatedSdks.test.ts b/src/lib/features/metrics/instance/findOutdatedSdks.test.ts index 654335dd8c..355254e891 100644 --- a/src/lib/features/metrics/instance/findOutdatedSdks.test.ts +++ b/src/lib/features/metrics/instance/findOutdatedSdks.test.ts @@ -4,7 +4,7 @@ describe('findOutdatedSDKs', () => { it('should return an empty array when all SDKs are up to date', () => { const sdkVersions = [ 'unleash-client-node:6.0.0', - 'unleash-client-php:2.0.0', + 'unleash-client-php:3.0.0', ]; const result = findOutdatedSDKs(sdkVersions); expect(result).toEqual([]); @@ -45,7 +45,7 @@ describe('findOutdatedSDKs', () => { it('should correctly handle semver versions', () => { const sdkVersions = [ 'unleash-client-node:6.1.0', - 'unleash-client-php:1.20.3-beta.0', + 'unleash-client-php:3.20.3-beta.0', ]; const result = findOutdatedSDKs(sdkVersions); expect(result).toEqual([]); diff --git a/src/lib/features/metrics/instance/findOutdatedSdks.ts b/src/lib/features/metrics/instance/findOutdatedSdks.ts index 29ab857558..3af2955e80 100644 --- a/src/lib/features/metrics/instance/findOutdatedSdks.ts +++ b/src/lib/features/metrics/instance/findOutdatedSdks.ts @@ -6,12 +6,12 @@ type SDKConfig = { const config: SDKConfig = { 'unleash-client-node': '5.3.2', - 'unleash-client-java': '9.0.0', + 'unleash-client-java': '9.2.0', 'unleash-client-go': '4.1.0', - 'unleash-client-python': '5.9.2', + 'unleash-client-python': '5.11.0', 'unleash-client-ruby': '5.0.0', 'unleash-client-dotnet': '4.1.3', - 'unleash-client-php': '1.13.0', + 'unleash-client-php': '2.3.0', }; export const isOutdatedSdk = (sdkVersion: string) => { diff --git a/website/docs/contributing/ADRs/back-end/frontend-api-design.md b/website/docs/contributing/ADRs/back-end/frontend-api-design.md index e2dec01124..53a4598b0e 100644 --- a/website/docs/contributing/ADRs/back-end/frontend-api-design.md +++ b/website/docs/contributing/ADRs/back-end/frontend-api-design.md @@ -16,13 +16,13 @@ Since every token had a dedicated repository with 10 tokens we were making 10 DB What's more each repository kept its own copy of the flags. What it means in practice is that two different tokens with the same project and environments would store the same flags twice. -[Frontend API before](/img/frontend-api-before.png) +![Frontend API before](/img/frontend-api-before.png) ## Decision To address these challenges, we came up with a new design: -[Frontend API after](/img/frontend-api-after.png) +![Frontend API after](/img/frontend-api-after.png) We decided to swap ProxyRepository with a drop-in replacement FrontendApiRepository. FrontendApiRepository doesn't store any flags on its own but always filters the flags that we keep in a GlobalFrontendApiCache. The cache stores all the flags and updates on every revision ID change.