Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/build/release-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

HELP="Args:
-v - Semver (2.42.0)
-v - Semver (2.44.0)
-d - Build image repository (Ex: -d redisinsight)
-r - Target repository (Ex: -r redis/redisinsight)
"
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/config/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default {
tlsKey: process.env.RI_SERVER_TLS_KEY,
staticContent: !!process.env.RI_SERVE_STATICS || true,
buildType: process.env.RI_BUILD_TYPE || 'DOCKER_ON_PREMISE',
appVersion: process.env.RI_APP_VERSION || '2.42.0',
appVersion: process.env.RI_APP_VERSION || '2.44.0',
requestTimeout: parseInt(process.env.RI_REQUEST_TIMEOUT, 10) || 25000,
excludeRoutes: [],
excludeAuthRoutes: [],
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/config/swagger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const SWAGGER_CONFIG: Omit<OpenAPIObject, 'paths'> = {
info: {
title: 'RedisInsight Backend API',
description: 'RedisInsight Backend API',
version: '2.42.0',
version: '2.44.0',
},
tags: [],
};
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redisinsight-api",
"version": "2.42.0",
"version": "2.44.0",
"description": "RedisInsight API",
"private": true,
"author": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ describe('RedisearchService', () => {
describe('list', () => {
it('should get list of indexes for standalone', async () => {
standaloneClient.sendCommand.mockResolvedValue([
keyName1.toString(),
keyName2.toString(),
keyName1,
keyName2,
]);

const list = await service.list(mockBrowserClientMetadata);
Expand All @@ -97,8 +97,8 @@ describe('RedisearchService', () => {
it('should get list of indexes for cluster (handle unique index name)', async () => {
databaseClientFactory.getOrCreateClient = jest.fn().mockResolvedValue(clusterClient);
mockStandaloneRedisClient.sendCommand.mockResolvedValue([
keyName1.toString(),
keyName2.toString(),
keyName1,
keyName2,
]);

const list = await service.list(mockBrowserClientMetadata);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,18 @@ export class RedisearchService {

try {
const client: RedisClient = await this.databaseClientFactory.getOrCreateClient(clientMetadata);
const nodes = this.getShards(client) as RedisClient[];
const nodes = await this.getShards(client) as RedisClient[];

const res = await Promise.all(nodes.map(async (node) => node.sendCommand(
['FT._LIST'],
)));

return plainToClass(ListRedisearchIndexesResponse, {
indexes: (uniq([].concat(...res))).map((idx) => Buffer.from(idx)),
indexes: (
uniq(
([].concat(...res)).map((idx) => idx.toString('hex')),
)
).map((idx) => Buffer.from(idx, 'hex')),
});
} catch (e) {
this.logger.error('Failed to get redisearch indexes', e);
Expand Down Expand Up @@ -100,7 +104,7 @@ export class RedisearchService {
}
}

const nodes = this.getShards(client) as RedisClient[];
const nodes = await this.getShards(client) as RedisClient[];

const commandArgs: any[] = [
index, 'ON', type,
Expand All @@ -121,7 +125,7 @@ export class RedisearchService {
...commandArgs,
], { replyEncoding: 'utf8' });
} catch (e) {
if (!e.message.includes('MOVED')) {
if (!e.message.includes('MOVED') && !e.message.includes('already exists')) {
throw e;
}
}
Expand Down Expand Up @@ -228,7 +232,7 @@ export class RedisearchService {
* @param client
* @private
*/
private getShards(client: RedisClient): Promise<RedisClient[]> | RedisClient[] {
private async getShards(client: RedisClient): Promise<RedisClient[]> {
if (client.getConnectionType() === RedisClientConnectionType.CLUSTER) {
return client.nodes(RedisClientNodeRole.PRIMARY);
}
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/desktop/src/lib/aboutPanel/aboutPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const ICON_PATH = app.isPackaged

export const AboutPanelOptions = {
applicationName: 'RedisInsight',
applicationVersion: `${app.getVersion() || '2.42.0'}${
applicationVersion: `${app.getVersion() || '2.44.0'}${
!config.isProduction ? `-dev-${process.getCreationTime()}` : ''
}`,
copyright: `Copyright © ${new Date().getFullYear()} Redis Ltd.`,
Expand Down
2 changes: 1 addition & 1 deletion redisinsight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "redisinsight",
"productName": "RedisInsight",
"private": true,
"version": "2.42.0",
"version": "2.44.0",
"description": "RedisInsight",
"main": "./dist/main/main.js",
"author": {
Expand Down