Skip to content

Commit 78a24b3

Browse files
authored
Merge pull request #2134 from RedisInsight/main
main to release 2.26.0
2 parents ac850c0 + 7b79310 commit 78a24b3

File tree

596 files changed

+26650
-13792
lines changed

Some content is hidden

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

596 files changed

+26650
-13792
lines changed

.circleci/config.yml

Lines changed: 143 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,29 @@ aliases:
2828
$filePathWithQuotes = '"{0}"' -f $filePath
2929
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86\signtool.exe" sign /a /sm /n "Redis Labs Inc." /fd sha256 /tr http://sha256timestamp.ws.symantec.com/sha256/timestamp /v $FilePathWithQuotes
3030
shell: powershell.exe
31-
scan: &scan
31+
fileScan: &fileScan
3232
run:
33-
name: Virustotal scan
34-
command: &virusscan |
33+
name: Virustotal file scan
34+
command: &virusfilescan |
3535
uploadUrl=$(curl -sq -XGET https://www.virustotal.com/api/v3/files/upload_url -H "x-apikey: $VIRUSTOTAL_API_KEY" | jq -r '.data')
3636
uploadFile=$("/usr/bin/find" /tmp/release -name ${FILE_NAME})
3737
echo "File to upload: ${uploadFile}"
3838
analysedId=$(curl -sq -XPOST "${uploadUrl}" -H "x-apikey: $VIRUSTOTAL_API_KEY" --form file=@"${uploadFile}" | jq -r '.data.id')
39+
if [ $analysedId == "null" ]; then
40+
echo 'Status is null, something went wrong'; exit 1;
41+
fi
42+
echo "export ANALYZED_ID=${analysedId}" >> $BASH_ENV
43+
echo "Virustotal Analyzed id: ${analysedId}"
44+
sleep 10
45+
shell: /bin/bash
46+
urlScan: &urlScan
47+
run:
48+
name: Virustotal url scan
49+
command: &virusurlscan |
50+
echo "Url to check: ${URL}"
51+
52+
analysedId=$(curl -sq -XPOST https://www.virustotal.com/api/v3/urls -H "x-apikey: $VIRUSTOTAL_API_KEY" --form url=${URL} | jq -r '.data.id')
53+
3954
if [ $analysedId == "null" ]; then
4055
echo 'Status is null, something went wrong'; exit 1;
4156
fi
@@ -76,13 +91,32 @@ aliases:
7691
echo "Results:"
7792
echo "analazedHarmless: ${analazedHarmless}, analazedMalicious: ${analazedMalicious}, analazedSuspicious: ${analazedSuspicious}"
7893

79-
if [ "$analazedHarmless" != "0" ] || [ "$analazedMalicious" != "0" ] || [ "$analazedSuspicious" != "0" ]; then
80-
echo 'Found dangers'; exit 1;
94+
if [ "$analazedMalicious" != "0" ] || [ "$analazedSuspicious" != "0" ]; then
95+
echo "export VIRUS_CHECK_FAILED=true" >> $BASH_ENV
96+
echo 'Found dangers'; exit 0;
8197
fi
8298

99+
echo "export VIRUS_CHECK_FAILED=false" >> $BASH_ENV
100+
echo "export SKIP_VIRUSTOTAL_REPORT=true" >> $BASH_ENV
83101
echo 'Passed';
84102
shell: /bin/bash
85103
no_output_timeout: 15m
104+
virustotalReport: &virustotalReport
105+
run:
106+
name: Virustotal slack report
107+
command: &virusreport |
108+
if [ "$SKIP_VIRUSTOTAL_REPORT" == "true" ]; then
109+
exit 0;
110+
fi
111+
112+
FILE_NAME=virustotal.report.json
113+
BUILD_NAME=$BUILD_NAME FILE_NAME=$FILE_NAME VIRUS_CHECK_FAILED=$VIRUS_CHECK_FAILED node .circleci/virustotal-report.js &&
114+
curl -H "Content-type: application/json" --data @$FILE_NAME -H "Authorization: Bearer ${SLACK_TEST_REPORT_KEY}" -X POST https://slack.com/api/chat.postMessage
115+
116+
if [ "$VIRUS_CHECK_FAILED" == "true" ]; then
117+
echo 'Found dangers'; exit 1;
118+
fi
119+
shell: /bin/bash
86120
iTestsNames: &iTestsNames
87121
- oss-st-5 # OSS Standalone v5
88122
- oss-st-5-pass # OSS Standalone v5 with admin pass required
@@ -91,7 +125,7 @@ aliases:
91125
- mods-preview # OSS Standalone and all preview modules
92126
- oss-st-6-tls # OSS Standalone v6 with TLS enabled
93127
- oss-st-6-tls-auth # OSS Standalone v6 with TLS auth required
94-
- oss-st-6-tls-auth-ssh # OSS Standalone v6 with TLS auth required through ssh
128+
# - oss-st-6-tls-auth-ssh # OSS Standalone v6 with TLS auth required through ssh
95129
- oss-clu # OSS Cluster
96130
- oss-clu-tls # OSS Cluster with TLS enabled
97131
- oss-sent # OSS Sentinel
@@ -565,7 +599,8 @@ jobs:
565599
- release/redisstack
566600
macosx:
567601
macos:
568-
xcode: 14.2.0
602+
xcode: 14.3.0
603+
resource_class: macos.x86.medium.gen2
569604
parameters:
570605
env:
571606
description: Build environment (stage || prod)
@@ -611,6 +646,7 @@ jobs:
611646
612647
UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage && yarn package:mas
613648
rm -rf release/mac
649+
mv release/mas-universal/RedisInsight-mac-universal-mas.pkg release/RedisInsight-mac-universal-mas.pkg
614650
no_output_timeout: 60m
615651

616652
- run:
@@ -624,7 +660,7 @@ jobs:
624660
- release/RedisInsight*.zip
625661
- release/RedisInsight*.dmg
626662
- release/RedisInsight*.dmg.blockmap
627-
- release/**/*.pkg
663+
- release/RedisInsight*.pkg
628664
- release/*-mac.yml
629665
- release/redisstack
630666
windows:
@@ -673,7 +709,7 @@ jobs:
673709
- release/RedisInsight*.exe
674710
- release/RedisInsight*.exe.blockmap
675711
- release/*.yml
676-
virustotal:
712+
virustotal-file:
677713
executor: linux-executor
678714
parameters:
679715
ext:
@@ -687,8 +723,35 @@ jobs:
687723
name: export FILE_NAME environment variable
688724
command: |
689725
echo 'export FILE_NAME="RedisInsight*<< parameters.ext >>"' >> $BASH_ENV
690-
- <<: *scan
726+
- <<: *fileScan
691727
- <<: *validate
728+
virustotal-url:
729+
executor: linux-executor
730+
parameters:
731+
fileName:
732+
description: File name
733+
type: string
734+
steps:
735+
- checkout
736+
- run:
737+
name: export URL environment variable
738+
command: |
739+
echo 'export URL="https://download.redisinsight.redis.com/latest/<< parameters.fileName >>"' >> $BASH_ENV
740+
echo 'export BUILD_NAME="<< parameters.fileName >>"' >> $BASH_ENV
741+
- <<: *urlScan
742+
- <<: *validate
743+
- <<: *virustotalReport
744+
745+
virustotal-report:
746+
executor: linux-executor
747+
steps:
748+
- checkout
749+
- run:
750+
name: Send virustotal passed report
751+
command: |
752+
echo 'export VIRUS_CHECK_FAILED=0' >> $BASH_ENV
753+
echo 'export SKIP_VIRUSTOTAL_REPORT=false' >> $BASH_ENV
754+
- <<: *virustotalReport
692755
docker:
693756
executor: linux-executor
694757
parameters:
@@ -1158,27 +1221,42 @@ workflows:
11581221
env: prod
11591222
requires: *prodElectronBuildRequires
11601223
# virus check all electron apps (prod)
1161-
- virustotal:
1224+
- virustotal-file:
11621225
name: Virus check - AppImage (prod)
11631226
ext: .AppImage
11641227
requires:
11651228
- Build app - Linux (prod)
1166-
- virustotal:
1229+
- virustotal-file:
11671230
name: Virus check - deb (prod)
11681231
ext: .deb
11691232
requires:
11701233
- Build app - Linux (prod)
1171-
- virustotal:
1234+
- virustotal-file:
1235+
name: Virus check - rpm (prod)
1236+
ext: .rpm
1237+
requires:
1238+
- Build app - Linux (prod)
1239+
- virustotal-file:
1240+
name: Virus check - snap (prod)
1241+
ext: .snap
1242+
requires:
1243+
- Build app - Linux (prod)
1244+
- virustotal-file:
11721245
name: Virus check x64 - dmg (prod)
11731246
ext: -x64.dmg
11741247
requires:
11751248
- Build app - MacOS (prod)
1176-
- virustotal:
1249+
- virustotal-file:
11771250
name: Virus check arm64 - dmg (prod)
11781251
ext: -arm64.dmg
11791252
requires:
11801253
- Build app - MacOS (prod)
1181-
- virustotal:
1254+
- virustotal-file:
1255+
name: Virus check MAS - pkg (prod)
1256+
ext: -mas.pkg
1257+
requires:
1258+
- Build app - MacOS (prod)
1259+
- virustotal-file:
11821260
name: Virus check - exe (prod)
11831261
ext: .exe
11841262
requires:
@@ -1189,8 +1267,11 @@ workflows:
11891267
requires:
11901268
- Virus check - AppImage (prod)
11911269
- Virus check - deb (prod)
1270+
- Virus check - rpm (prod)
1271+
- Virus check - snap (prod)
11921272
- Virus check x64 - dmg (prod)
11931273
- Virus check arm64 - dmg (prod)
1274+
- Virus check MAS - pkg (prod)
11941275
- Virus check - exe (prod)
11951276
# Manual approve for publish release
11961277
- approve-publish:
@@ -1229,10 +1310,10 @@ workflows:
12291310
name: Build app - Linux (stage)
12301311
requires:
12311312
- Setup build (stage)
1232-
# - windows:
1233-
# name: Build app - Windows (stage)
1234-
# requires:
1235-
# - Setup build (stage)
1313+
# - windows:
1314+
# name: Build app - Windows (stage)
1315+
# requires:
1316+
# - Setup build (stage)
12361317
# integration tests on docker image build
12371318
- integration-tests-run:
12381319
matrix:
@@ -1253,12 +1334,49 @@ workflows:
12531334
requires:
12541335
- Build docker image
12551336
# e2e desktop tests on AppImage build
1256-
# - e2e-app-image:
1257-
# name: E2ETest (AppImage) - Nightly
1258-
# parallelism: 4
1259-
# report: true
1260-
# requires:
1261-
# - Build app - Linux (stage)
1337+
- e2e-app-image:
1338+
name: E2ETest (AppImage) - Nightly
1339+
parallelism: 2
1340+
report: true
1341+
requires:
1342+
- Build app - Linux (stage)
1343+
1344+
- virustotal-url:
1345+
name: Virus check - AppImage (nightly)
1346+
fileName: RedisInsight-v2-linux-x86_64.AppImage
1347+
- virustotal-url:
1348+
name: Virus check - deb (nightly)
1349+
fileName: RedisInsight-v2-linux-amd64.deb
1350+
- virustotal-url:
1351+
name: Virus check - rpm (nightly)
1352+
fileName: RedisInsight-v2-linux-x86_64.rpm
1353+
- virustotal-url:
1354+
name: Virus check - snap (nightly)
1355+
fileName: RedisInsight-v2-linux-amd64.snap
1356+
- virustotal-url:
1357+
name: Virus check x64 - dmg (nightly)
1358+
fileName: RedisInsight-v2-mac-x64.dmg
1359+
- virustotal-url:
1360+
name: Virus check arm64 - dmg (nightly)
1361+
fileName: RedisInsight-v2-mac-arm64.dmg
1362+
- virustotal-url:
1363+
name: Virus check MAS - pkg (nightly)
1364+
fileName: RedisInsight-mac-universal-mas.pkg
1365+
- virustotal-url:
1366+
name: Virus check - exe (nightly)
1367+
fileName: RedisInsight-v2-win-installer.exe
1368+
- virustotal-report:
1369+
name: Virus check report (prod)
1370+
requires:
1371+
- Virus check - AppImage (nightly)
1372+
- Virus check - deb (nightly)
1373+
- Virus check - rpm (nightly)
1374+
- Virus check - snap (nightly)
1375+
- Virus check x64 - dmg (nightly)
1376+
- Virus check arm64 - dmg (nightly)
1377+
- Virus check MAS - pkg (nightly)
1378+
- Virus check - exe (nightly)
1379+
12621380
# # e2e desktop tests on exe build
12631381
# - e2e-exe:
12641382
# name: E2ETest (exe) - Nightly

.circleci/virustotal-report.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
const fs = require('fs');
2+
3+
const fileName = process.env.FILE_NAME;
4+
const buildName = process.env.BUILD_NAME;
5+
const failed = process.env.VIRUS_CHECK_FAILED === 'true';
6+
7+
const results = {
8+
message: {
9+
text: `*Virustotal checks* (Branch: *${process.env.CIRCLE_BRANCH}*)` +
10+
`\n<https://app.circleci.com/pipelines/workflows/${process.env.CIRCLE_WORKFLOW_ID}|View on CircleCI>`,
11+
attachments: [],
12+
},
13+
};
14+
15+
const result = {
16+
color: '#36a64f',
17+
title: `Finished at: ${new Date().toISOString()}`,
18+
text: `All builds were passed via virustotal checks`,
19+
fields: [],
20+
};
21+
22+
if (failed) {
23+
results.passed = false;
24+
result.color = '#cc0000';
25+
result.text = 'Build had failed virustotal checks';
26+
result.fields.push({
27+
title: 'Failed build',
28+
value: buildName,
29+
short: true,
30+
});
31+
}
32+
33+
results.message.attachments.push(result);
34+
35+
if (failed === true) {
36+
results.message.text = '<!here> ' + results.message.text;
37+
}
38+
39+
fs.writeFileSync(fileName, JSON.stringify({
40+
channel: process.env.SLACK_VIRUSTOTAL_REPORT_CHANNEL,
41+
...results.message,
42+
}));

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Add reviewers for the most sensitive folders
22
33
4+
/redisinsight/api/config/features-config.json [email protected] [email protected] [email protected]

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ vendor
5959

6060
# E2E tests report
6161
/tests/e2e/report
62+
/tests/e2e/results
63+
/tests/e2e/remote
6264
/tests/e2e/.redisinsight-v2
6365

6466
# Parcel

configs/webpack.config.web.dev.babel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export default merge(commonConfig, {
174174

175175
devServer: {
176176
host: HOST,
177-
disableHostCheck: true,
177+
allowedHosts: 'all',
178178
port: 8080,
179179
hot: true, // enable HMR on the server
180180
historyApiFallback: true,

electron-builder.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"type": "distribution",
3434
"hardenedRuntime": true,
3535
"darkModeSupport": true,
36-
"bundleVersion": "6",
36+
"bundleVersion": "10",
3737
"icon": "resources/icon.icns",
3838
"artifactName": "${productName}-${os}-${arch}.${ext}",
3939
"entitlements": "resources/entitlements.mac.plist",

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
],
7878
"homepage": "https://github.com/RedisInsight/RedisInsight#readme",
7979
"resolutions": {
80-
"**/node-sass": "^6.0.1"
80+
"**/node-sass": "^6.0.1",
81+
"**/trim": "0.0.3"
8182
},
8283
"devDependencies": {
8384
"@babel/core": "^7.12.9",
@@ -103,10 +104,7 @@
103104
"@babel/preset-react": "^7.12.7",
104105
"@babel/preset-typescript": "^7.12.7",
105106
"@babel/register": "^7.12.1",
106-
"@nestjs/cli": "^7.0.0",
107-
"@nestjs/schematics": "^7.0.0",
108-
"@nestjs/testing": "^7.0.0",
109-
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
107+
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
110108
"@svgr/webpack": "^6.2.1",
111109
"@teamsupercell/typings-for-css-modules-loader": "^2.4.0",
112110
"@testing-library/jest-dom": "^5.16.4",
@@ -153,8 +151,8 @@
153151
"core-js": "^3.6.5",
154152
"cross-env": "^7.0.2",
155153
"css-loader": "^5.0.1",
156-
"css-minimizer-webpack-plugin": "^1.2.0",
157-
"electron": "^19.0.7",
154+
"css-minimizer-webpack-plugin": "^2.0.0",
155+
"electron": "19.0.7",
158156
"electron-builder": "^23.6.0",
159157
"electron-builder-notarize": "^1.5.1",
160158
"electron-debug": "^3.2.0",
@@ -211,7 +209,7 @@
211209
"webpack": "^5.5.1",
212210
"webpack-bundle-analyzer": "^4.1.0",
213211
"webpack-cli": "^4.3.0",
214-
"webpack-dev-server": "^3.11.0",
212+
"webpack-dev-server": "^4.13.3",
215213
"webpack-merge": "^5.4.0",
216214
"whatwg-fetch": "^3.6.2",
217215
"yarn-deduplicate": "^3.1.0"

0 commit comments

Comments
 (0)