Skip to content

Commit c019870

Browse files
author
arthosofteq
authored
Merge pull request #595 from RedisInsight/release/2.0.6
Release/2.0.6
2 parents 3054a68 + 90ad9da commit c019870

File tree

388 files changed

+13380
-19091
lines changed

Some content is hidden

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

388 files changed

+13380
-19091
lines changed

.circleci/config.yml

Lines changed: 75 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ jobs:
302302
name: .AppImage tests
303303
command: |
304304
cd tests/e2e && export TEST_FILES=$(circleci tests glob "tests/**/*.e2e.ts" | circleci tests split) && cd ../..
305-
.circleci/scripts/e2e/app-image.e2e.sh
305+
.circleci/e2e/test.app-image.sh
306306
- when:
307307
condition:
308308
equal: [ true, << parameters.report >> ]
@@ -315,6 +315,42 @@ jobs:
315315
curl -H "Content-type: application/json" --data @e2e.report.json -H "Authorization: Bearer $SLACK_TEST_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage
316316
- store_test_results:
317317
path: ./tests/e2e/results
318+
e2e-exe:
319+
executor:
320+
name: win/default
321+
parameters:
322+
report:
323+
description: Send report for test run to slack
324+
type: boolean
325+
default: false
326+
parallelism:
327+
description: Number of threads to run tests
328+
type: integer
329+
default: 1
330+
parallelism: << parameters.parallelism >>
331+
steps:
332+
- checkout
333+
- attach_workspace:
334+
at: .
335+
- run: choco install nodejs --version=15.14.0
336+
- run:
337+
command: |
338+
cd tests/e2e && export TEST_FILES=$(circleci tests glob "tests/**/*.e2e.ts" | circleci tests split) && cd ../..
339+
.circleci/e2e/test.exe.cmd
340+
shell: bash.exe
341+
- when:
342+
condition:
343+
equal: [ true, << parameters.report >> ]
344+
steps:
345+
- run:
346+
name: Send report
347+
when: always
348+
command: |
349+
APP_BUILD_TYPE="Electron (Windows)" node ./.circleci/e2e-results.js
350+
curl -H "Content-type: application/json" --data @e2e.report.json -H "Authorization: Bearer $SLACK_TEST_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage
351+
shell: bash.exe
352+
- store_test_results:
353+
path: ./tests/e2e/results
318354

319355
e2e-tests:
320356
executor: linux-executor
@@ -756,41 +792,50 @@ jobs:
756792
aws s3 mv s3://${AWS_BUCKET_NAME}/private/${applicationVersion}/ \
757793
s3://${AWS_BUCKET_NAME}/${upgradeLatestFolderPath} --recursive
758794
795+
# invalidate cloudfront cash
796+
aws cloudfront create-invalidation --distribution-id ${AWS_DISTRIBUTION_ID} --paths "/*"
797+
759798
- run:
760799
name: Add tags for all objects and create S3 metrics
761800
command: |
762801
763802
# declare all tags
764803
declare -A tag0=(
765-
[key]='platform'
766-
[value]='macos'
804+
[arch]='x64'
805+
[platform]='macos'
767806
[objectDownload]=${applicationName}'-mac-x64.dmg'
768807
[objectUpgrade]=${applicationName}'-mac-x64.zip'
769808
)
770809
771810
declare -A tag1=(
772-
[key]='platform'
773-
[value]='macos'
811+
[arch]='arm64'
812+
[platform]='macos'
774813
[objectDownload]=${applicationName}'-mac-arm64.dmg'
775814
[objectUpgrade]=${applicationName}'-mac-arm64.zip'
776815
)
777816
778817
declare -A tag2=(
779-
[key]='platform'
780-
[value]='windows'
818+
[arch]='x64'
819+
[platform]='windows'
781820
[objectDownload]=${applicationName}'-win-installer.exe'
782821
)
783822
784823
declare -A tag3=(
785-
[key]='platform'
786-
[value]='linux_AppImage'
787-
[objectDownload]=${applicationName}'-x86_64.AppImage'
824+
[arch]='x64'
825+
[platform]='linux_AppImage'
826+
[objectDownload]=${applicationName}'-linux-x86_64.AppImage'
788827
)
789828
790829
declare -A tag4=(
791-
[key]='platform'
792-
[value]='linux_deb'
793-
[objectDownload]=${applicationName}'-amd64.deb'
830+
[arch]='x64'
831+
[platform]='linux_deb'
832+
[objectDownload]=${applicationName}'-linux-amd64.deb'
833+
)
834+
835+
declare -A tag5=(
836+
[arch]='x64'
837+
[platform]='linux_rpm'
838+
[objectDownload]=${applicationName}'-linux-x86_64.rpm'
794839
)
795840
796841
# loop for add all tags to each app and create metrics
@@ -800,32 +845,32 @@ jobs:
800845
designation0="downloads"
801846
designation1="upgrades"
802847
803-
id0="${tag[value]}_${designation0}_${applicationVersion}"
804-
id1="${tag[value]}_${designation1}_${applicationVersion}"
848+
id0="${tag[platform]}_${tag[arch]}_${designation0}_${applicationVersion}"
849+
id1="${tag[platform]}_${tag[arch]}_${designation1}_${applicationVersion}"
805850
806851
# add tags to each app for download
807852
aws s3api put-object-tagging \
808853
--bucket ${AWS_BUCKET_NAME} \
809854
--key ${downloadLatestFolderPath}/${tag[objectDownload]} \
810-
--tagging '{"TagSet": [{ "Key": "version", "Value": "'"${applicationVersion}"'" }, {"Key": "'"${tag[key]}"'", "Value": "'"${tag[value]}"'"}, { "Key": "designation", "Value": "'"${designation0}"'" }]}'
855+
--tagging '{"TagSet": [{ "Key": "version", "Value": "'"${applicationVersion}"'" }, {"Key": "platform", "Value": "'"${tag[platform]}"'"}, {"Key": "arch", "Value": "'"${tag[arch]}"'"}, { "Key": "designation", "Value": "'"${designation0}"'" }]}'
811856
812857
# add tags to each app for upgrades
813858
aws s3api put-object-tagging \
814859
--bucket ${AWS_BUCKET_NAME} \
815860
--key ${upgradeLatestFolderPath}/${tag[objectUpgrade]:=${tag[objectDownload]}} \
816-
--tagging '{"TagSet": [{ "Key": "version", "Value": "'"${applicationVersion}"'" }, {"Key": "'"${tag[key]}"'", "Value": "'"${tag[value]}"'"}, { "Key": "designation", "Value": "'"${designation1}"'" }]}'
861+
--tagging '{"TagSet": [{ "Key": "version", "Value": "'"${applicationVersion}"'" }, {"Key": "platform", "Value": "'"${tag[platform]}"'"}, {"Key": "arch", "Value": "'"${tag[arch]}"'"}, { "Key": "designation", "Value": "'"${designation1}"'" }]}'
817862
818863
# Create metrics for all tags for downloads to S3
819864
aws s3api put-bucket-metrics-configuration \
820865
--bucket ${AWS_BUCKET_NAME} \
821866
--id ${id0} \
822-
--metrics-configuration '{"Id": "'"${id0}"'", "Filter": {"And": {"Tags": [{"Key": "'"${tag[key]}"'", "Value": "'"${tag[value]}"'"}, {"Key": "designation", "Value": "'"${designation0}"'"}, {"Key": "version", "Value": "'"${applicationVersion}"'"} ]}}}'
867+
--metrics-configuration '{"Id": "'"${id0}"'", "Filter": {"And": {"Tags": [{"Key": "platform", "Value": "'"${tag[platform]}"'"}, {"Key": "arch", "Value": "'"${tag[arch]}"'"}, {"Key": "designation", "Value": "'"${designation0}"'"}, {"Key": "version", "Value": "'"${applicationVersion}"'"} ]}}}'
823868
824869
# Create metrics for all tags for upgrades to S3
825870
aws s3api put-bucket-metrics-configuration \
826871
--bucket ${AWS_BUCKET_NAME} \
827872
--id ${id1} \
828-
--metrics-configuration '{"Id": "'"${id1}"'", "Filter": {"And": {"Tags": [{"Key": "'"${tag[key]}"'", "Value": "'"${tag[value]}"'"}, {"Key": "designation", "Value": "'"${designation1}"'"}, {"Key": "version", "Value": "'"${applicationVersion}"'"}]}}}'
873+
--metrics-configuration '{"Id": "'"${id1}"'", "Filter": {"And": {"Tags": [{"Key": "platform", "Value": "'"${tag[platform]}"'"}, {"Key": "arch", "Value": "'"${tag[arch]}"'"}, {"Key": "designation", "Value": "'"${designation1}"'"}, {"Key": "version", "Value": "'"${applicationVersion}"'"}]}}}'
829874
830875
done
831876
@@ -1064,7 +1109,6 @@ workflows:
10641109
branches:
10651110
only:
10661111
- main
1067-
- latest
10681112
jobs:
10691113
# build docker image
10701114
- docker:
@@ -1080,6 +1124,10 @@ workflows:
10801124
name: Build app - Linux (stage)
10811125
requires:
10821126
- Setup build (stage)
1127+
- windows:
1128+
name: Build app - Windows (stage)
1129+
requires:
1130+
- Setup build (stage)
10831131
# integration tests on docker image build
10841132
- integration-tests-run:
10851133
matrix:
@@ -1106,3 +1154,10 @@ workflows:
11061154
report: true
11071155
requires:
11081156
- Build app - Linux (stage)
1157+
# e2e desktop tests on exe build
1158+
- e2e-exe:
1159+
name: E2ETest (exe) - Nightly
1160+
parallelism: 4
1161+
report: true
1162+
requires:
1163+
- Build app - Windows (stage)

.circleci/e2e/test.exe.cmd

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@echo off
2+
3+
set COMMON_URL=%USERPROFILE%/AppData/Local/Programs/redisinsight/resources/app.asar/index.html
4+
set ELECTRON_PATH=%USERPROFILE%/AppData/Local/Programs/redisinsight/RedisInsight-preview.exe
5+
set OSS_STANDALONE_HOST=%E2E_CLOUD_DATABASE_HOST%
6+
set OSS_STANDALONE_PORT=%E2E_CLOUD_DATABASE_PORT%
7+
set OSS_STANDALONE_USERNAME=%E2E_CLOUD_DATABASE_USERNAME%
8+
set OSS_STANDALONE_PASSWORD=%E2E_CLOUD_DATABASE_PASSWORD%
9+
set SOCKETS_CORS=true
10+
11+
call yarn --cwd tests/e2e install
12+
13+
call "./release/RedisInsight-preview-win-installer.exe"
14+
15+
:: waiting until app auto launches
16+
timeout 5
17+
18+
:: close an auto launched app
19+
taskkill /im RedisInsight-preview.exe /f
20+
taskkill /im RedisInsight-preview-win-installer.exe /f
21+
22+
:: run tests
23+
call yarn --cwd tests/e2e dotenv -e .desktop.env yarn --cwd tests/e2e test:desktop:ci:win

docs/plugins/development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ consistency with plugin visualisations and the entire application.
125125

126126
Find the example of the plugin here.
127127

128-
* [Client List Plugin README](../../redisinsight/ui/src/packages/clients-list-example/README.md)
129-
* [Client List Plugin dir](../../redisinsight/ui/src/packages/clients-list-example/)
128+
* [Client List Plugin README](https://github.com/RedisInsight/Packages/blob/main/clients-list-example/README.md)
129+
* [Client List Plugin dir](https://github.com/RedisInsight/Packages/blob/main/clients-list-example/)
130130

131131
### Available parameters
132132

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
"@types/express": "^4.17.3",
143143
"@types/html-entities": "^1.3.4",
144144
"@types/ioredis": "^4.26.0",
145+
"@types/is-glob": "^4.0.2",
145146
"@types/jest": "^26.0.15",
146147
"@types/lodash": "^4.14.171",
147148
"@types/node": "14.14.10",
@@ -153,6 +154,7 @@
153154
"@types/redux-mock-store": "^1.0.2",
154155
"@types/segment-analytics": "^0.0.34",
155156
"@types/supertest": "^2.0.8",
157+
"@types/uuid": "^8.3.4",
156158
"@types/webpack-env": "^1.15.2",
157159
"@typescript-eslint/eslint-plugin": "^4.8.1",
158160
"@typescript-eslint/parser": "^4.8.1",
@@ -242,6 +244,7 @@
242244
"formik": "^2.2.9",
243245
"html-entities": "^2.3.2",
244246
"html-react-parser": "^1.2.4",
247+
"jsonpath": "^1.1.1",
245248
"lodash": "^4.17.21",
246249
"react": "^17.0.1",
247250
"react-contenteditable": "^3.3.5",
@@ -262,7 +265,9 @@
262265
"remark-rehype": "^10.0.1",
263266
"socket.io-client": "^4.4.0",
264267
"unified": "^10.1.1",
265-
"unist-util-visit": "^4.1.0"
268+
"unist-util-visit": "^4.1.0",
269+
"url-parse": "^1.5.10",
270+
"uuid": "^8.3.2"
266271
},
267272
"devEngines": {
268273
"node": ">=14.x <16",

redisinsight/api/config/default.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { join } from 'path';
2+
import * as os from 'os';
23

34
const homedir = join(__dirname, '..');
45

@@ -15,6 +16,7 @@ const defaultsDir = process.env.BUILD_TYPE === 'ELECTRON' && process['resourcesP
1516

1617
export default {
1718
dir_path: {
19+
tmpDir: os.tmpdir(),
1820
homedir,
1921
prevHomedir: homedir,
2022
staticDir,
@@ -66,7 +68,7 @@ export default {
6668
migrationsRun: process.env.DB_MIGRATIONS ? process.env.DB_MIGRATIONS === 'true' : true,
6769
},
6870
redis_cloud: {
69-
url: process.env.REDIS_CLOUD_URL || 'https://api.qa.redislabs.com/v1',
71+
url: process.env.REDIS_CLOUD_URL || 'https://api-cloudapi.qa.redislabs.com/v1',
7072
},
7173
redis_clients: {
7274
idleSyncInterval: parseInt(process.env.CLIENTS_IDLE_SYNC_INTERVAL, 10) || 1000 * 60 * 60, // 1hr
@@ -87,10 +89,14 @@ export default {
8789
redis_cli: {
8890
unsupportedCommands: JSON.parse(process.env.CLI_UNSUPPORTED_COMMANDS || '[]'),
8991
},
92+
profiler: {
93+
logFileIdleThreshold: parseInt(process.env.PROFILER_LOG_FILE_IDLE_THRESHOLD, 10) || 1000 * 60, // 1min
94+
},
9095
analytics: {
9196
writeKey: process.env.SEGMENT_WRITE_KEY || 'SOURCE_WRITE_KEY',
9297
},
9398
logger: {
99+
logLevel: process.env.LOG_LEVEL || 'info', // log level
94100
stdout: process.env.STDOUT_LOGGER ? process.env.STDOUT_LOGGER === 'true' : false, // disabled by default
95101
files: process.env.FILES_LOGGER ? process.env.FILES_LOGGER === 'true' : true, // enabled by default
96102
omitSensitiveData: process.env.LOGGER_OMIT_DATA ? process.env.LOGGER_OMIT_DATA === 'true' : true,

redisinsight/api/config/development.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default {
1010
migrationsRun: process.env.DB_MIGRATIONS ? process.env.DB_MIGRATIONS === 'true' : false,
1111
},
1212
logger: {
13+
logLevel: process.env.LOG_LEVEL || 'debug',
1314
stdout: process.env.STDOUT_LOGGER ? process.env.STDOUT_LOGGER === 'true' : true, // enabled by default
1415
omitSensitiveData: process.env.LOGGER_OMIT_DATA ? process.env.LOGGER_OMIT_DATA === 'true' : false,
1516
},

redisinsight/api/config/logger.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ if (LOGGER_CONFIG.files) {
5858
const logger: WinstonModuleOptions = {
5959
format: format.errors({ stack: true }),
6060
transports: transportsConfig,
61+
level: LOGGER_CONFIG.logLevel,
6162
};
6263

6364
export default logger;

redisinsight/api/config/test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ export default {
33
env: 'test',
44
requestTimeout: 1000,
55
},
6+
profiler: {
7+
logFileIdleThreshold: parseInt(process.env.PROFILER_LOG_FILE_IDLE_THRESHOLD, 10) || 1000 * 3, // 3sec
8+
},
69
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import {MigrationInterface, QueryRunner} from "typeorm";
2+
3+
export class sni1650278664000 implements MigrationInterface {
4+
name = 'sni1650278664000'
5+
6+
public async up(queryRunner: QueryRunner): Promise<void> {
7+
await queryRunner.query(`CREATE TABLE "temporary_database_instance" ("id" varchar PRIMARY KEY NOT NULL, "host" varchar NOT NULL, "port" integer NOT NULL, "name" varchar NOT NULL, "username" varchar, "password" varchar, "tls" boolean NOT NULL, "verifyServerCert" boolean NOT NULL, "lastConnection" datetime, "caCertId" varchar, "clientCertId" varchar, "connectionType" varchar NOT NULL DEFAULT ('STANDALONE'), "nodes" varchar, "nameFromProvider" varchar, "sentinelMasterName" varchar, "sentinelMasterUsername" varchar, "sentinelMasterPassword" varchar, "provider" varchar DEFAULT ('UNKNOWN'), "modules" varchar NOT NULL DEFAULT ('[]'), "db" integer, "encryption" varchar, "tlsServername" varchar, CONSTRAINT "FK_3b9b625266c00feb2d66a9f36e4" FOREIGN KEY ("clientCertId") REFERENCES "client_certificate" ("id") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT "FK_d1bc747b5938e22b4b708d8e9a5" FOREIGN KEY ("caCertId") REFERENCES "ca_certificate" ("id") ON DELETE SET NULL ON UPDATE NO ACTION)`);
8+
await queryRunner.query(`INSERT INTO "temporary_database_instance"("id", "host", "port", "name", "username", "password", "tls", "verifyServerCert", "lastConnection", "caCertId", "clientCertId", "connectionType", "nodes", "nameFromProvider", "sentinelMasterName", "sentinelMasterUsername", "sentinelMasterPassword", "provider", "modules", "db", "encryption") SELECT "id", "host", "port", "name", "username", "password", "tls", "verifyServerCert", "lastConnection", "caCertId", "clientCertId", "connectionType", "nodes", "nameFromProvider", "sentinelMasterName", "sentinelMasterUsername", "sentinelMasterPassword", "provider", "modules", "db", "encryption" FROM "database_instance"`);
9+
await queryRunner.query(`DROP TABLE "database_instance"`);
10+
await queryRunner.query(`ALTER TABLE "temporary_database_instance" RENAME TO "database_instance"`);
11+
}
12+
13+
public async down(queryRunner: QueryRunner): Promise<void> {
14+
await queryRunner.query(`ALTER TABLE "database_instance" RENAME TO "temporary_database_instance"`);
15+
await queryRunner.query(`CREATE TABLE "database_instance" ("id" varchar PRIMARY KEY NOT NULL, "host" varchar NOT NULL, "port" integer NOT NULL, "name" varchar NOT NULL, "username" varchar, "password" varchar, "tls" boolean NOT NULL, "verifyServerCert" boolean NOT NULL, "lastConnection" datetime, "caCertId" varchar, "clientCertId" varchar, "connectionType" varchar NOT NULL DEFAULT ('STANDALONE'), "nodes" varchar, "nameFromProvider" varchar, "sentinelMasterName" varchar, "sentinelMasterUsername" varchar, "sentinelMasterPassword" varchar, "provider" varchar DEFAULT ('UNKNOWN'), "modules" varchar NOT NULL DEFAULT ('[]'), "db" integer, "encryption" varchar, CONSTRAINT "FK_3b9b625266c00feb2d66a9f36e4" FOREIGN KEY ("clientCertId") REFERENCES "client_certificate" ("id") ON DELETE SET NULL ON UPDATE NO ACTION, CONSTRAINT "FK_d1bc747b5938e22b4b708d8e9a5" FOREIGN KEY ("caCertId") REFERENCES "ca_certificate" ("id") ON DELETE SET NULL ON UPDATE NO ACTION)`);
16+
await queryRunner.query(`INSERT INTO "database_instance"("id", "host", "port", "name", "username", "password", "tls", "verifyServerCert", "lastConnection", "caCertId", "clientCertId", "connectionType", "nodes", "nameFromProvider", "sentinelMasterName", "sentinelMasterUsername", "sentinelMasterPassword", "provider", "modules", "db", "encryption") SELECT "id", "host", "port", "name", "username", "password", "tls", "verifyServerCert", "lastConnection", "caCertId", "clientCertId", "connectionType", "nodes", "nameFromProvider", "sentinelMasterName", "sentinelMasterUsername", "sentinelMasterPassword", "provider", "modules", "db", "encryption" FROM "temporary_database_instance"`);
17+
await queryRunner.query(`DROP TABLE "temporary_database_instance"`);
18+
}
19+
20+
}

0 commit comments

Comments
 (0)