diff --git a/.github/build/release-docker.sh b/.github/build/release-docker.sh index 671ab90e0b..fb3717a8f0 100755 --- a/.github/build/release-docker.sh +++ b/.github/build/release-docker.sh @@ -2,7 +2,7 @@ set -e HELP="Args: --v - Semver (2.70.0) +-v - Semver (2.70.1) -d - Build image repository (Ex: -d redisinsight) -r - Target repository (Ex: -r redis/redisinsight) " diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index b437b0d023..13d41eb6a5 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -98,9 +98,11 @@ jobs: - uses: jwalton/gh-find-current-pr@v1 id: findPr + continue-on-error: true - name: Post or Update Coverage Summary Comment uses: actions/github-script@v7 + if: ${{ steps.findPr.outputs.number != '' }} with: script: | const fs = require('fs'); diff --git a/.github/workflows/tests-integration.yml b/.github/workflows/tests-integration.yml index 8099e0eade..6f37963166 100644 --- a/.github/workflows/tests-integration.yml +++ b/.github/workflows/tests-integration.yml @@ -137,13 +137,67 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverages-${{ matrix.rte }} - path: itest/coverages + path: ./itest/coverages - - name: Send report to Slack - if: inputs.report && always() + - name: Debug and validate test result XML + if: always() run: | - ITEST_NAME=${{ matrix.rte }} node ./.github/itest-results.js - curl -H "Content-type: application/json" --data @itests.report.json -H "Authorization: Bearer $SLACK_TEST_REPORT_KEY" -X POST https://slack.com/api/chat.postMessage + echo "=== Checking source coverage directory ===" + ls -la ./redisinsight/api/test/test-runs/coverage/ || echo "Source coverage directory doesn't exist" + + echo "=== Checking test result files ===" + ls -la ./itest/results/ || echo "Results directory doesn't exist" + + echo "=== Current working directory ===" + pwd + ls -la . + + XML_FILE="./itest/results/${{ matrix.rte }}.result.xml" + SOURCE_XML="./redisinsight/api/test/test-runs/coverage/test-run-result.xml" + + echo "=== Checking source XML file ===" + if [ -f "$SOURCE_XML" ]; then + echo "✅ Source XML found: $SOURCE_XML" + echo "Source file size: $(wc -c < "$SOURCE_XML") bytes" + else + echo "❌ Source XML not found: $SOURCE_XML" + fi + + if [ -f "$XML_FILE" ]; then + echo "=== XML file found: $XML_FILE ===" + echo "File size: $(wc -c < "$XML_FILE") bytes" + echo "Line count: $(wc -l < "$XML_FILE") lines" + + echo "=== First 20 lines of XML ===" + head -20 "$XML_FILE" + + echo "=== Last 10 lines of XML ===" + tail -10 "$XML_FILE" + + echo "=== Checking XML validity ===" + if command -v xmllint >/dev/null 2>&1; then + if xmllint --noout "$XML_FILE" 2>/dev/null; then + echo "✅ XML is well-formed" + else + echo "❌ XML is malformed" + xmllint --noout "$XML_FILE" 2>&1 || true + fi + else + echo "xmllint not available, skipping XML validation" + fi + + echo "=== Basic XML structure check ===" + if grep -q "" "$XML_FILE"; then + echo "✅ XML has testsuites root element" + else + echo "❌ XML missing testsuites root element" + fi + + else + echo "❌ XML file not found: $XML_FILE" + echo "Available files in ./itest/results/:" + ls -la ./itest/results/ 2>/dev/null || echo "Directory doesn't exist" + fi - name: Generate test results uses: dorny/test-reporter@v1 @@ -151,8 +205,8 @@ jobs: if: always() with: name: 'Test results: IT (${{ matrix.rte }}) tests' - path: itest/results/*.result.xml - reporter: jest-junit + path: ./itest/results/*.result.xml + reporter: java-junit list-tests: 'failed' list-suites: 'failed' fail-on-error: 'false' @@ -208,4 +262,4 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, artifact_id: ${{ steps.merge-artifacts.outputs.artifact-id }} - }); + }); \ No newline at end of file diff --git a/redisinsight/api/config/default.ts b/redisinsight/api/config/default.ts index 3f55306555..02febba8ac 100644 --- a/redisinsight/api/config/default.ts +++ b/redisinsight/api/config/default.ts @@ -107,7 +107,7 @@ export default { : true, buildType: process.env.RI_BUILD_TYPE || 'DOCKER_ON_PREMISE', appType: process.env.RI_APP_TYPE, - appVersion: process.env.RI_APP_VERSION || '2.70.0', + appVersion: process.env.RI_APP_VERSION || '2.70.1', requestTimeout: parseInt(process.env.RI_REQUEST_TIMEOUT, 10) || 25000, excludeRoutes: [], excludeAuthRoutes: [], diff --git a/redisinsight/api/config/swagger.ts b/redisinsight/api/config/swagger.ts index e5230f0d94..343566a99a 100644 --- a/redisinsight/api/config/swagger.ts +++ b/redisinsight/api/config/swagger.ts @@ -5,7 +5,7 @@ const SWAGGER_CONFIG: Omit = { info: { title: 'Redis Insight Backend API', description: 'Redis Insight Backend API', - version: '2.70.0', + version: '2.70.1', }, tags: [], }; diff --git a/redisinsight/api/package.json b/redisinsight/api/package.json index a05a9ce86e..f62770c461 100644 --- a/redisinsight/api/package.json +++ b/redisinsight/api/package.json @@ -1,6 +1,6 @@ { "name": "redisinsight-api", - "version": "2.70.0", + "version": "2.70.1", "description": "Redis Insight API", "private": true, "author": { @@ -35,7 +35,7 @@ "typeorm": "ts-node -r tsconfig-paths/register ./node_modules/typeorm/cli.js -d ./config/ormconfig.ts", "test:api": "cross-env NODE_ENV=test ts-mocha --paths --config ./test/api/.mocharc.yml", "test:api:cov": "nyc --reporter=html --reporter=text --reporter=text-summary yarn run test:api", - "test:api:ci:cov": "cross-env nyc -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json && nyc merge .nyc_output ./coverage/test-run-coverage.json", + "test:api:ci:cov": "cross-env NODE_ENV=test nyc --temp-dir coverage/.nyc_output --report-dir coverage --instrument -r text -r text-summary -r html yarn run test:api --reporter mocha-multi-reporters --reporter-options configFile=test/api/reporters.json; echo 'Exit code from tests:' $? > coverage/debug.log; echo 'NYC tests completed, checking .nyc_output...' >> coverage/debug.log; ls -la coverage/.nyc_output >> coverage/debug.log 2>&1; echo 'Running NYC merge...' >> coverage/debug.log; nyc merge coverage/.nyc_output coverage/test-run-coverage.json >> coverage/debug.log 2>&1; echo 'NYC merge exit code:' $? >> coverage/debug.log; echo 'NYC merge completed!' >> coverage/debug.log; ls -la coverage/test-run-coverage.json >> coverage/debug.log 2>&1", "typeorm:migrate": "cross-env NODE_ENV=staging yarn typeorm migration:generate ./migration/migration", "typeorm:run": "yarn typeorm migration:run", "typeorm:run:stage": "cross-env NODE_ENV=staging yarn typeorm migration:run" @@ -149,6 +149,7 @@ "tsconfig-paths-webpack-plugin": "^3.3.0", "typescript": "^4.8.2" }, + "jest": { "moduleFileExtensions": [ "js", diff --git a/redisinsight/api/src/modules/database/providers/database.client.factory.spec.ts b/redisinsight/api/src/modules/database/providers/database.client.factory.spec.ts index 6e0fc522a1..79fc5b6b47 100644 --- a/redisinsight/api/src/modules/database/providers/database.client.factory.spec.ts +++ b/redisinsight/api/src/modules/database/providers/database.client.factory.spec.ts @@ -256,6 +256,7 @@ describe('DatabaseClientFactory', () => { }, ); }); + it('should throw original error and emit connection failed event for RedisConnection* errors', async () => { jest .spyOn(redisClientFactory, 'createClient') diff --git a/redisinsight/api/test/test-runs/docker.build.env b/redisinsight/api/test/test-runs/docker.build.env index 64ca7d26e6..50fd64cef0 100644 --- a/redisinsight/api/test/test-runs/docker.build.env +++ b/redisinsight/api/test/test-runs/docker.build.env @@ -1,4 +1,4 @@ -COV_FOLDER=./coverage +COV_FOLDER=./test/test-runs/coverage ID=defaultid RTE=defaultrte APP_IMAGE=redisinsight:amd64 diff --git a/redisinsight/api/test/test-runs/docker.build.yml b/redisinsight/api/test/test-runs/docker.build.yml index 6b3949adea..b3d40ebd78 100644 --- a/redisinsight/api/test/test-runs/docker.build.yml +++ b/redisinsight/api/test/test-runs/docker.build.yml @@ -13,7 +13,7 @@ services: dockerfile: ./test/test-runs/test.Dockerfile tty: true volumes: - - shared-data:/usr/src/app/coverage + - shared-data:/usr/src/app/test/test-runs/coverage - shared-data:/root/.redisinsight-v2.0 - shared-data:/data depends_on: @@ -57,5 +57,5 @@ volumes: driver: local driver_opts: type: none - device: ${COV_FOLDER} + device: ../../${COV_FOLDER} o: bind diff --git a/redisinsight/api/test/test-runs/local.build.env b/redisinsight/api/test/test-runs/local.build.env index d0fd5b848e..61a61f5040 100644 --- a/redisinsight/api/test/test-runs/local.build.env +++ b/redisinsight/api/test/test-runs/local.build.env @@ -1,4 +1,4 @@ -COV_FOLDER=./coverage +COV_FOLDER=./test/test-runs/coverage ID=defaultid RTE=defaultrte RI_NOTIFICATION_UPDATE_URL=https://s3.amazonaws.com/redisinsight.test/public/tests/notifications.json diff --git a/redisinsight/api/test/test-runs/local.build.yml b/redisinsight/api/test/test-runs/local.build.yml index 1f5e33787c..97c37dbc56 100644 --- a/redisinsight/api/test/test-runs/local.build.yml +++ b/redisinsight/api/test/test-runs/local.build.yml @@ -13,7 +13,7 @@ services: dockerfile: ./test/test-runs/test.Dockerfile tty: true volumes: - - ${COV_FOLDER}:/usr/src/app/coverage + - ../../${COV_FOLDER}:/usr/src/app/coverage - ${COV_FOLDER}:/root/.redisinsight-v2.0 depends_on: - redis diff --git a/redisinsight/desktop/src/lib/aboutPanel/aboutPanel.ts b/redisinsight/desktop/src/lib/aboutPanel/aboutPanel.ts index ab0efc0ec0..2433e3a05e 100644 --- a/redisinsight/desktop/src/lib/aboutPanel/aboutPanel.ts +++ b/redisinsight/desktop/src/lib/aboutPanel/aboutPanel.ts @@ -7,7 +7,7 @@ const ICON_PATH = app.isPackaged : path.join(__dirname, '../resources', 'icon.png') const appVersionPrefix = config.isEnterprise ? 'Enterprise - ' : '' -const appVersion = app.getVersion() || '2.70.0' +const appVersion = app.getVersion() || '2.70.1' const appVersionSuffix = !config.isProduction ? `-dev-${process.getCreationTime()}` : '' diff --git a/redisinsight/package.json b/redisinsight/package.json index 5a2902f2f5..db58b39d5e 100644 --- a/redisinsight/package.json +++ b/redisinsight/package.json @@ -3,7 +3,7 @@ "appName": "Redis Insight", "productName": "RedisInsight", "private": true, - "version": "2.70.0", + "version": "2.70.1", "description": "Redis Insight", "main": "./dist/main/main.js", "author": { diff --git a/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/useChangeEditorType.tsx b/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/useChangeEditorType.tsx index ccd214c0ac..0d82705698 100644 --- a/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/useChangeEditorType.tsx +++ b/redisinsight/ui/src/pages/browser/modules/key-details/components/change-editor-type-button/useChangeEditorType.tsx @@ -7,6 +7,7 @@ import { rejsonSelector, setEditorType, } from 'uiSrc/slices/browser/rejson' + import { EditorType } from 'uiSrc/slices/interfaces' import { selectedKeyDataSelector } from 'uiSrc/slices/browser/keys' @@ -16,6 +17,7 @@ export const useChangeEditorType = () => { const { [FeatureFlags.envDependent]: envDependentFeature } = useSelector( appFeatureFlagsFeaturesSelector, ) + const selectedKey = useSelector(selectedKeyDataSelector)?.name const isTextEditorDisabled = !isWithinThreshold && !envDependentFeature?.flag