From 646470724a908e7fd76202b8287d1fda34413185 Mon Sep 17 00:00:00 2001 From: Artsiom Kharuzhenka Date: Wed, 29 Jan 2025 22:09:40 +0200 Subject: [PATCH 1/6] RI-6667 better handle errors for recommendations to avoid crashes (#4330) --- .../database-recommendation.service.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/redisinsight/api/src/modules/database-recommendation/database-recommendation.service.ts b/redisinsight/api/src/modules/database-recommendation/database-recommendation.service.ts index e2f6721977..b2f7d1ffab 100644 --- a/redisinsight/api/src/modules/database-recommendation/database-recommendation.service.ts +++ b/redisinsight/api/src/modules/database-recommendation/database-recommendation.service.ts @@ -81,7 +81,7 @@ export class DatabaseRecommendationService { clientMetadata: ClientMetadata, recommendationNames: string[], data: any, - ): Promise> { + ): Promise> { try { const newClientMetadata = { ...clientMetadata, @@ -108,10 +108,10 @@ export class DatabaseRecommendationService { return results.reduce((acc, result, idx) => ({ ...acc, [recommendationNames[idx]]: result, - }), {} as Map); + }), {}); } catch (e) { this.logger.warn('Unable to check recommendation', e, clientMetadata); - return null; + return {}; } } @@ -126,8 +126,12 @@ export class DatabaseRecommendationService { recommendationName: string, data: any, ): Promise { - const result = await this.checkMulti(clientMetadata, [recommendationName], data); - return result[recommendationName]; + try { + const result = await this.checkMulti(clientMetadata, [recommendationName], data); + return result[recommendationName]; + } catch (e) { + return null; + } } /** From cd1e09989b4852100991ec222a34e51d51a891f9 Mon Sep 17 00:00:00 2001 From: Artsiom Kharuzhenka Date: Wed, 29 Jan 2025 22:09:54 +0200 Subject: [PATCH 2/6] RI-6660 fix APPLICATION_FIRST_START event was not sent (#4326) --- redisinsight/api/src/modules/init/local.init.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/redisinsight/api/src/modules/init/local.init.service.ts b/redisinsight/api/src/modules/init/local.init.service.ts index 999ba2a7c0..fb69cae910 100644 --- a/redisinsight/api/src/modules/init/local.init.service.ts +++ b/redisinsight/api/src/modules/init/local.init.service.ts @@ -48,6 +48,7 @@ export class LocalInitService extends InitService { appVersion, ...(await this.featuresConfigService.getControlInfo(sessionMetadata)), firstStart, + sessionMetadata, }); } } From 44fde7d74e13bbf65e68d4f0bc78adcc3dba57b0 Mon Sep 17 00:00:00 2001 From: Artsiom Kharuzhenka Date: Wed, 29 Jan 2025 22:10:10 +0200 Subject: [PATCH 3/6] RI-6661 apply "count" arg before applying DEFAULT_COUNT value for threshold (#4328) --- redisinsight/ui/src/slices/browser/keys.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redisinsight/ui/src/slices/browser/keys.ts b/redisinsight/ui/src/slices/browser/keys.ts index 6e52f06669..8834a4b9e3 100644 --- a/redisinsight/ui/src/slices/browser/keys.ts +++ b/redisinsight/ui/src/slices/browser/keys.ts @@ -524,7 +524,7 @@ export function fetchPatternKeysAction( sourceKeysFetch = CancelToken.source() const state = stateInit() - const scanThreshold = state.user.settings.config?.scanThreshold || SCAN_COUNT_DEFAULT + const scanThreshold = state.user.settings.config?.scanThreshold || count || SCAN_COUNT_DEFAULT const { search: match, filter: type } = state.browser.keys const { encoding } = state.app.info From ed8321bd9a31a73fa33f792d036431d34098f5cc Mon Sep 17 00:00:00 2001 From: Vlad Date: Thu, 30 Jan 2025 10:22:10 +0100 Subject: [PATCH 4/6] e2e/bugfix/fix-failing-e2e (#4327) * e2e/bugfix/fix-failing-e2e * remove only --- .../electron/critical-path/workbench/json-workbench.e2e.ts | 3 ++- .../web/critical-path/browser/search-capabilities.e2e.ts | 2 +- tests/e2e/tests/web/regression/database/notification.e2e.ts | 4 ++-- .../tests/web/regression/insights/live-recommendations.e2e.ts | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/e2e/tests/electron/critical-path/workbench/json-workbench.e2e.ts b/tests/e2e/tests/electron/critical-path/workbench/json-workbench.e2e.ts index cd3c0bea8a..73aa897ab9 100644 --- a/tests/e2e/tests/electron/critical-path/workbench/json-workbench.e2e.ts +++ b/tests/e2e/tests/electron/critical-path/workbench/json-workbench.e2e.ts @@ -27,7 +27,8 @@ fixture `JSON verifications at Workbench` await workbenchPage.sendCommandInWorkbench(`FT.DROPINDEX ${indexName} DD`); await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneRedisearch); }); -test('Verify that user can see result in Table and Text view for JSON data types for FT.AGGREGATE command in Workbench', async t => { +// TODO unskip after resolving https://redislabs.atlassian.net/browse/RI-6670 +test.skip('Verify that user can see result in Table and Text view for JSON data types for FT.AGGREGATE command in Workbench', async t => { indexName = Common.generateWord(5); const commandsForSend = [ `FT.CREATE ${indexName} ON JSON SCHEMA $.user.name AS name TEXT $.user.tag AS country TAG`, diff --git a/tests/e2e/tests/web/critical-path/browser/search-capabilities.e2e.ts b/tests/e2e/tests/web/critical-path/browser/search-capabilities.e2e.ts index 0c6dcde6d0..ca8c6b5093 100644 --- a/tests/e2e/tests/web/critical-path/browser/search-capabilities.e2e.ts +++ b/tests/e2e/tests/web/critical-path/browser/search-capabilities.e2e.ts @@ -202,7 +202,7 @@ test.requestHooks(logger) await browserPage.Cli.sendCommandInCli(`FT.DROPINDEX ${indexName}`); await databaseAPIRequests.deleteStandaloneDatabaseApi(ossStandaloneBigConfig); })('Index creation', async t => { - const createIndexLink = 'https://redis.io/docs/latest/commands/ft.create/?utm_source=redisinsight&utm_medium=app&utm_campaign=browser_search'; + const createIndexLink = 'https://redis.io/docs/latest/commands/ft.create/'; // Verify that telemetry event 'SEARCH_MODE_CHANGED' sent await t.click(browserPage.redisearchModeBtn); diff --git a/tests/e2e/tests/web/regression/database/notification.e2e.ts b/tests/e2e/tests/web/regression/database/notification.e2e.ts index 31b3424c68..ee1ea6690d 100644 --- a/tests/e2e/tests/web/regression/database/notification.e2e.ts +++ b/tests/e2e/tests/web/regression/database/notification.e2e.ts @@ -57,7 +57,7 @@ test.before(async() => { await t.click(browserPage.NavigationPanel.myRedisDBButton); await t.hover(myRedisDatabasePage.iconNotUsedDatabase); await t.expect(myRedisDatabasePage.notificationUnusedDbMessage.textContent).contains('Probabilistic data structures', 'there is no info about module'); - await t.expect(myRedisDatabasePage.notificationUnusedDbMessage.textContent).contains('free Cloud databases will be deleted after 15 days of inactivity.', 'there is no expected info'); + await t.expect(myRedisDatabasePage.notificationUnusedDbMessage.textContent).contains('Free Cloud DBs auto-delete after 15 days of inactivity.', 'there is no expected info'); await myRedisDatabasePage.clickOnDBByName(ossStandaloneConfig.databaseName); await t.click(browserPage.NavigationPanel.myRedisDBButton); @@ -66,5 +66,5 @@ test.before(async() => { await t.hover(myRedisDatabasePage.iconDeletedDatabase); await t.expect(myRedisDatabasePage.notificationUnusedDbMessage.textContent).contains('Build your app with Redis Cloud', 'there is no common'); - await t.expect(myRedisDatabasePage.notificationUnusedDbMessage.textContent).contains('Free Cloud DBs auto-delete after 15 days', 'there is no expected info'); + await t.expect(myRedisDatabasePage.notificationUnusedDbMessage.textContent).contains('Free Cloud DBs auto-delete after 15 days of inactivity.', 'there is no expected info'); }); diff --git a/tests/e2e/tests/web/regression/insights/live-recommendations.e2e.ts b/tests/e2e/tests/web/regression/insights/live-recommendations.e2e.ts index 7bfc130c7a..ec63f56d81 100644 --- a/tests/e2e/tests/web/regression/insights/live-recommendations.e2e.ts +++ b/tests/e2e/tests/web/regression/insights/live-recommendations.e2e.ts @@ -141,7 +141,7 @@ test // Verify that the INSIGHTS_RECOMMENDATIONS_VOTED event sent with Database ID, Recommendation_name, Vote type parameters when user voted for recommendation await telemetry.verifyEventHasProperties(telemetryEvent, expectedProperties, logger); - await telemetry.verifyEventPropertyValue(telemetryEvent, 'name', 'updateDatabase', logger); + await telemetry.verifyEventPropertyValue(telemetryEvent, 'name', 'redisVersion', logger); await telemetry.verifyEventPropertyValue(telemetryEvent, 'vote', notUsefulVoteOption, logger); // Verify that user can see previous votes when reload the page From 621f8eebc548f44ae73ef56dda9f82326b9875b7 Mon Sep 17 00:00:00 2001 From: kchepikava <139325900+kchepikava@users.noreply.github.com> Date: Thu, 30 Jan 2025 13:10:51 +0100 Subject: [PATCH 5/6] RI-6656 hide cpu from mini-dash on small screen (#4331) --- .../components/OverviewMetrics/styles.module.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/redisinsight/ui/src/components/database-overview/components/OverviewMetrics/styles.module.scss b/redisinsight/ui/src/components/database-overview/components/OverviewMetrics/styles.module.scss index c9a5512d80..4cc4260274 100644 --- a/redisinsight/ui/src/components/database-overview/components/OverviewMetrics/styles.module.scss +++ b/redisinsight/ui/src/components/database-overview/components/OverviewMetrics/styles.module.scss @@ -6,6 +6,10 @@ .cpuWrapper { min-width: 96px; + + @media only screen and (max-width: 992px) { + display: none !important; + } } .calculation { From 2972bd5498a48b21d6304b6e5c30c1debef24575 Mon Sep 17 00:00:00 2001 From: Kristiyan Ivanov Date: Thu, 30 Jan 2025 16:52:44 +0200 Subject: [PATCH 6/6] RI-6684 Open new window doesnt work on windows due to a typo (#4333) --- redisinsight/desktop/src/lib/window/browserWindow.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redisinsight/desktop/src/lib/window/browserWindow.ts b/redisinsight/desktop/src/lib/window/browserWindow.ts index fc92a6e7a4..98adceef70 100644 --- a/redisinsight/desktop/src/lib/window/browserWindow.ts +++ b/redisinsight/desktop/src/lib/window/browserWindow.ts @@ -46,7 +46,7 @@ export const createWindow = async ({ if (isNewMainWindow) { const [currentWindowX, currentWindowY] = currentWindow.getPosition() - const [currentWindowWidth, currentWindowHeight] = currentWindow?.includeSize() + const [currentWindowWidth, currentWindowHeight] = currentWindow?.getSize() x = currentWindowX + NEW_WINDOW_OFFSET y = currentWindowY + NEW_WINDOW_OFFSET width = currentWindowWidth