Skip to content

Commit f003628

Browse files
authored
Merge pull request #4039 from RedisInsight/latest
Latest to main
2 parents c045afa + eb0c6a8 commit f003628

File tree

30 files changed

+133
-87
lines changed

30 files changed

+133
-87
lines changed

.circleci/build/release-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
HELP="Args:
5-
-v - Semver (2.58.0)
5+
-v - Semver (2.60.0)
66
-d - Build image repository (Ex: -d redisinsight)
77
-r - Target repository (Ex: -r redis/redisinsight)
88
"

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ aliases:
121121
- oss-st-5 # OSS Standalone v5
122122
- oss-st-5-pass # OSS Standalone v5 with admin pass required
123123
- oss-st-6 # OSS Standalone v6 and all modules
124-
- oss-st-big # OSS Standalone v6 and all modules and predefined amount of data inside (~3-4M)
124+
# TODO: Investigate why it randomly fails
125+
# - oss-st-big # OSS Standalone v6 and all modules and predefined amount of data inside (~3-4M)
125126
- mods-preview # OSS Standalone and all preview modules
126127
- oss-st-6-tls # OSS Standalone v6 with TLS enabled
127128
- oss-st-6-tls-auth # OSS Standalone v6 with TLS auth required

.github/build/release-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -e
33

44
HELP="Args:
5-
-v - Semver (2.58.0)
5+
-v - Semver (2.60.0)
66
-d - Build image repository (Ex: -d redisinsight)
77
-r - Target repository (Ex: -r redis/redisinsight)
88
"

redisinsight/api/config/default.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default {
8080
migrateOldFolders: process.env.RI_MIGRATE_OLD_FOLDERS ? process.env.RI_MIGRATE_OLD_FOLDERS === 'true' : true,
8181
autoBootstrap: process.env.RI_AUTO_BOOTSTRAP ? process.env.RI_AUTO_BOOTSTRAP === 'true' : true,
8282
buildType: process.env.RI_BUILD_TYPE || 'DOCKER_ON_PREMISE',
83-
appVersion: process.env.RI_APP_VERSION || '2.58.0',
83+
appVersion: process.env.RI_APP_VERSION || '2.60.0',
8484
requestTimeout: parseInt(process.env.RI_REQUEST_TIMEOUT, 10) || 25000,
8585
excludeRoutes: [],
8686
excludeAuthRoutes: [],
@@ -279,7 +279,7 @@ export default {
279279
},
280280
},
281281
ai: {
282-
convAiApiUrl: process.env.RI_AI_CONVAI_API_URL || 'https://staging.redis.io/convai/api',
282+
convAiApiUrl: process.env.RI_AI_CONVAI_API_URL || 'https://staging.learn.redis.com/convai/api',
283283
convAiToken: process.env.RI_AI_CONVAI_TOKEN,
284284
querySocketUrl: process.env.RI_AI_QUERY_SOCKET_URL || 'https://app-sm.k8s-cloudapi.sm-qa.qa.redislabs.com',
285285
querySocketPath: process.env.RI_AI_QUERY_SOCKET_PATH || '/api/v1/cloud-copilot-service/socket.io/',

redisinsight/api/config/swagger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const SWAGGER_CONFIG: Omit<OpenAPIObject, 'paths'> = {
55
info: {
66
title: 'Redis Insight Backend API',
77
description: 'Redis Insight Backend API',
8-
version: '2.58.0',
8+
version: '2.60.0',
99
},
1010
tags: [],
1111
};

redisinsight/api/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redisinsight-api",
3-
"version": "2.58.0",
3+
"version": "2.60.0",
44
"description": "Redis Insight API",
55
"private": true,
66
"author": {
@@ -28,7 +28,7 @@
2828
"start:prod": "cross-env NODE_ENV=production node dist/src/main",
2929
"test": "cross-env NODE_ENV=test ./node_modules/.bin/jest -w 1",
3030
"test:watch": "cross-env NODE_ENV=test jest --watch -w 1",
31-
"test:cov": "cross-env NODE_ENV=test ./node_modules/.bin/jest --forceExit --coverage -w 4",
31+
"test:cov": "cross-env NODE_ENV=test ./node_modules/.bin/jest --forceExit --coverage --runInBand",
3232
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand -w 1",
3333
"test:e2e": "jest --config ./test/jest-e2e.json -w 1",
3434
"typeorm": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js -d ./config/ormconfig.ts",

redisinsight/api/src/modules/cloud/auth/cloud-auth.service.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export class CloudAuthService {
3535

3636
private authRequests: Map<string, CloudAuthRequest> = new Map();
3737

38+
private inProgressRequests: Map<string, CloudAuthRequest> = new Map();
39+
3840
constructor(
3941
private readonly sessionService: CloudSessionService,
4042
private readonly googleIdpAuthStrategy: GoogleIdpCloudAuthStrategy,
@@ -185,6 +187,8 @@ export class CloudAuthService {
185187
// delete authRequest on this step
186188
// allow to redirect with authorization code only once
187189
this.authRequests.delete(query.state);
190+
// Track in progress auth requests to avoid errors when for some reason many we receive many the same calls
191+
this.inProgressRequests.set(query.state, authRequest);
188192

189193
const tokens = await this.exchangeCode(authRequest, query.code);
190194

@@ -297,4 +301,12 @@ export class CloudAuthService {
297301
throw wrapHttpError(e);
298302
}
299303
}
304+
305+
isRequestInProgress(query) {
306+
return !!this.inProgressRequests.has(query?.state);
307+
}
308+
309+
finishInProgressRequest(query) {
310+
this.inProgressRequests.delete(query?.state);
311+
}
300312
}

redisinsight/desktop/src/lib/aboutPanel/aboutPanel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const ICON_PATH = app.isPackaged
88

99
export const AboutPanelOptions = {
1010
applicationName: 'Redis Insight',
11-
applicationVersion: `${app.getVersion() || '2.58.0'}${
11+
applicationVersion: `${app.getVersion() || '2.60.0'}${
1212
!config.isProduction ? `-dev-${process.getCreationTime()}` : ''
1313
}`,
1414
copyright: `Copyright © ${new Date().getFullYear()} Redis Ltd.`,

redisinsight/desktop/src/lib/cloud/cloud-oauth.handlers.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,22 @@ export const initCloudOauthHandlers = () => {
7676
export const cloudOauthCallback = async (url: UrlWithParsedQuery) => {
7777
try {
7878
const authService: CloudAuthService = getBackendApp()?.get?.(CloudAuthService)
79+
80+
// Ignore xdg-open when the same request is being processed.
81+
if (authService.isRequestInProgress(url.query)) {
82+
return
83+
}
84+
7985
const result = await authService.handleCallback(url.query)
8086

8187
if (result.status === CloudAuthStatus.Failed) {
8288
const [currentWindow] = getWindows().values()
8389

8490
currentWindow?.webContents.send(IpcOnEvent.cloudOauthCallback, result)
8591
}
92+
93+
// complete auth request processing
94+
authService.finishInProgressRequest(url.query)
8695
} catch (e) {
8796
log.error(wrapErrorMessageSensitiveData(e as Error))
8897
}

redisinsight/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"appName": "Redis Insight",
44
"productName": "RedisInsight",
55
"private": true,
6-
"version": "2.58.0",
6+
"version": "2.60.0",
77
"description": "Redis Insight",
88
"main": "./dist/main/main.js",
99
"author": {

0 commit comments

Comments
 (0)