Skip to content

Commit a970c37

Browse files
Merge branch 'main' into feature/dynamic-dependencies
2 parents d4814c1 + 8c3d681 commit a970c37

File tree

94 files changed

+1043
-325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1043
-325
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.52.0)
5+
-v - Semver (2.54.0)
66
-d - Build image repository (Ex: -d redisinsight)
77
-r - Target repository (Ex: -r redis/redisinsight)
88
"

configs/webpack.config.main.prod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export default merge(baseConfig, {
5656
DEBUG_PROD: false,
5757
START_MINIMIZED: false,
5858
RI_APP_TYPE: 'electron',
59+
RI_AUTO_BOOTSTRAP: false,
5960
RI_SERVER_TLS_CERT: process.env.RI_SERVER_TLS_CERT || '',
6061
RI_SERVER_TLS_KEY: process.env.RI_SERVER_TLS_KEY || '',
6162
RI_SERVE_STATICS: false,

redisinsight/api/config/default.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ export default {
7575
tlsCert: process.env.RI_SERVER_TLS_CERT,
7676
tlsKey: process.env.RI_SERVER_TLS_KEY,
7777
staticContent: !!process.env.RI_SERVE_STATICS || true,
78+
migrateOldFolders: process.env.RI_MIGRATE_OLD_FOLDERS ? process.env.RI_MIGRATE_OLD_FOLDERS === 'true' : true,
79+
autoBootstrap: process.env.RI_AUTO_BOOTSTRAP ? process.env.RI_AUTO_BOOTSTRAP === 'true' : true,
7880
buildType: process.env.RI_BUILD_TYPE || 'DOCKER_ON_PREMISE',
79-
appVersion: process.env.RI_APP_VERSION || '2.52.0',
81+
appVersion: process.env.RI_APP_VERSION || '2.54.0',
8082
requestTimeout: parseInt(process.env.RI_REQUEST_TIMEOUT, 10) || 25000,
8183
excludeRoutes: [],
8284
excludeAuthRoutes: [],
@@ -146,7 +148,7 @@ export default {
146148
},
147149
content: {
148150
updateUrl: process.env.RI_CONTENT_UPDATE_URL
149-
|| 'https://github.com/RedisInsight/Statics/releases/download/2.42',
151+
|| 'https://github.com/RedisInsight/Statics/releases/download/2.54',
150152
zip: process.env.RI_CONTENT_ZIP || dataZipFileName,
151153
buildInfo: process.env.RI_CONTENT_INFO || buildInfoFileName,
152154
devMode: !!process.env.RI_CONTENT_PATH,

redisinsight/api/config/features-config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"version": 2.5203,
2+
"version": 2.5401,
33
"features": {
44
"redisDataIntegration": {
55
"flag": true,
6-
"perc": [[0,0]],
6+
"perc": [[0,100]],
77
"filters": [
88
{
99
"name": "config.server.buildType",

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.52.0',
8+
version: '2.54.0',
99
},
1010
tags: [],
1111
};

redisinsight/api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redisinsight-api",
3-
"version": "2.52.0",
3+
"version": "2.54.0",
44
"description": "Redis Insight API",
55
"private": true,
66
"author": {

redisinsight/api/src/__mocks__/databases.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export const mockDatabaseSentinelMasterPasswordEncrypted = 'database.sentinelMas
2828

2929
export const mockDatabaseSentinelMasterPasswordPlain = 'some sentinel pass';
3030

31+
export const mockDBSize = 1;
32+
3133
export const mockDatabase = Object.assign(new Database(), {
3234
id: mockDatabaseId,
3335
name: 'database-name',
@@ -268,6 +270,7 @@ export const mockDatabaseInfoProvider = jest.fn(() => ({
268270
determineSentinelMasterGroups: jest.fn().mockReturnValue([mockSentinelMasterDto]),
269271
determineClusterNodes: jest.fn().mockResolvedValue(mockClusterNodes),
270272
getRedisGeneralInfo: jest.fn().mockResolvedValueOnce(mockRedisGeneralInfo),
273+
getRedisDBSize: jest.fn().mockResolvedValue(mockDBSize),
271274
getClientListInfo: jest.fn().mockReturnValue(mockRedisClientListResult),
272275
}));
273276

redisinsight/api/src/constants/custom-error-codes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export enum CustomErrorCodes {
1313
CloudOauthUnknownAuthorizationRequest = 11_007,
1414
CloudOauthUnexpectedError = 11_008,
1515
CloudOauthMissedRequiredData = 11_009,
16+
CloudOauthCanceled = 11_010,
1617
CloudCapiUnauthorized = 11_021,
1718
CloudCapiKeyUnauthorized = 11_022,
1819
CloudCapiKeyNotFound = 11_023,

redisinsight/api/src/constants/error-messages.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ export default {
8686

8787
CLOUD_CAPI_KEY_UNAUTHORIZED: 'Unable to authorize such CAPI key',
8888

89+
CLOUD_OAUTH_CANCELED: 'Authorization request was canceled.',
8990
CLOUD_OAUTH_MISCONFIGURATION: 'Authorization server misconfiguration.',
9091
CLOUD_OAUTH_GITHUB_EMAIL_PERMISSION: 'Unable to get an email from the GitHub account. Make sure that it is available.',
9192
CLOUD_OAUTH_MISSED_REQUIRED_DATA: 'Unable to get required data from the user profile.',
92-
CLOUD_OAUTH_GITHUB_UNKNOWN_AUTHORIZATION_REQUEST: 'Unknown authorization request.',
93+
CLOUD_OAUTH_UNKNOWN_AUTHORIZATION_REQUEST: 'Unknown authorization request.',
9394
CLOUD_OAUTH_UNEXPECTED_ERROR: 'Unexpected error.',
9495

9596
CLOUD_JOB_UNEXPECTED_ERROR: 'Unexpected error occurred',

redisinsight/api/src/main.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ interface IApp {
2525
}
2626

2727
export default async function bootstrap(apiPort?: number): Promise<IApp> {
28-
await migrateHomeFolder() && await removeOldFolders();
28+
if (serverConfig.migrateOldFolders) {
29+
await migrateHomeFolder() && await removeOldFolders();
30+
}
2931

3032
const { port, host } = serverConfig;
3133
const logger = WinstonModule.createLogger(LOGGER_CONFIG);
@@ -95,6 +97,6 @@ export default async function bootstrap(apiPort?: number): Promise<IApp> {
9597
return { app, gracefulShutdown };
9698
}
9799

98-
if (process.env.RI_APP_TYPE !== 'electron') {
100+
if (serverConfig.autoBootstrap) {
99101
bootstrap();
100102
}

0 commit comments

Comments
 (0)