Skip to content

Commit f33716c

Browse files
Merge branch 'main' of https://github.com/RedisInsight/RedisInsight into feature/RI-4616-rdi-support
2 parents c04c564 + 248eb6e commit f33716c

File tree

167 files changed

+2059
-9362
lines changed

Some content is hidden

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

167 files changed

+2059
-9362
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ jobs:
647647
export RI_CLOUD_IDP_GH_ID=$RI_CLOUD_IDP_GH_ID_STAGE
648648
export RI_CLOUD_API_URL=$RI_CLOUD_API_URL_STAGE
649649
export RI_CLOUD_CAPI_URL=$RI_CLOUD_CAPI_URL_STAGE
650+
export RI_FEATURES_CONFIG_URL=$RI_FEATURES_CONFIG_URL_STAGE
650651
651652
if [ << parameters.env >> == 'stage' ]; then
652653
RI_UPGRADES_LINK=$RI_UPGRADES_LINK_STAGE RI_SEGMENT_WRITE_KEY=$RI_SEGMENT_WRITE_KEY_STAGE yarn package:stage --linux << parameters.target >>
@@ -723,6 +724,7 @@ jobs:
723724
export RI_CLOUD_CAPI_URL=$RI_CLOUD_CAPI_URL_STAGE
724725
export RI_UPGRADES_LINK=''
725726
export RI_SEGMENT_WRITE_KEY=''
727+
export RI_FEATURES_CONFIG_URL=$RI_FEATURES_CONFIG_URL_STAGE
726728
727729
if [ << parameters.env >> == 'stage' ]; then
728730
export RI_UPGRADES_LINK=$RI_UPGRADES_LINK_STAGE
@@ -804,6 +806,7 @@ jobs:
804806
export RI_CLOUD_IDP_GH_ID=$RI_CLOUD_IDP_GH_ID_STAGE
805807
export RI_CLOUD_API_URL=$RI_CLOUD_API_URL_STAGE
806808
export RI_CLOUD_CAPI_URL=$RI_CLOUD_CAPI_URL_STAGE
809+
export RI_FEATURES_CONFIG_URL=$RI_FEATURES_CONFIG_URL_STAGE
807810
808811
if [ << parameters.env >> == 'stage' ]; then
809812
RI_UPGRADES_LINK=$RI_UPGRADES_LINK_STAGE RI_SEGMENT_WRITE_KEY=$RI_SEGMENT_WRITE_KEY_STAGE yarn package:stage --win << parameters.target >>

configs/webpack.config.main.prod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export default merge(baseConfig, {
8383
RI_AI_CONVAI_TOKEN: 'RI_AI_CONVAI_TOKEN' in process.env ? process.env.RI_AI_CONVAI_TOKEN: '',
8484
RI_AI_QUERY_USER: 'RI_AI_QUERY_USER' in process.env ? process.env.RI_AI_QUERY_USER: '',
8585
RI_AI_QUERY_PASS: 'RI_AI_QUERY_PASS' in process.env ? process.env.RI_AI_QUERY_PASS: '',
86+
RI_FEATURES_CONFIG_URL: 'RI_FEATURES_CONFIG_URL' in process.env ? process.env.RI_FEATURES_CONFIG_URL: '',
8687
}),
8788

8889
new webpack.DefinePlugin({

redisinsight/api/config/default.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,6 @@ export default {
205205
url: process.env.RI_COMMANDS_REDISBLOOM_URL
206206
|| 'https://raw.githubusercontent.com/RedisBloom/RedisBloom/master/commands.json',
207207
},
208-
{
209-
name: 'triggers_and_functions',
210-
url: process.env.RI_COMMANDS_TRIGGERS_AND_FUNCTIONS_URL
211-
|| 'https://raw.githubusercontent.com/RedisGears/RedisGears/master/commands.json',
212-
},
213208
],
214209
connections: {
215210
timeout: parseInt(process.env.RI_CONNECTIONS_TIMEOUT_DEFAULT, 10) || 30 * 1_000, // 30 sec
@@ -265,5 +260,7 @@ export default {
265260
querySocketUrl: process.env.RI_AI_QUERY_SOCKET_URL || 'https://app-sm.k8s-cloudapi.sm-qa.qa.redislabs.com',
266261
querySocketPath: process.env.RI_AI_QUERY_SOCKET_PATH || '/api/v1/cloud-copilot-service/socket.io/',
267262
queryHistoryLimit: parseInt(process.env.RI_AI_QUERY_HISTORY_LIMIT, 10) || 20,
263+
queryMaxResults: parseInt(process.env.RI_AI_QUERY_MAX_RESULTS, 10) || 50,
264+
queryMaxNestedElements: parseInt(process.env.RI_AI_QUERY_MAX_NESTED_ELEMENTS, 10) || 25,
268265
},
269266
};

redisinsight/api/config/features-config.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,6 @@
2727
}],
2828
"selectPlan": {
2929
"components": {
30-
"triggersAndFunctions": [
31-
{
32-
"provider": "AWS",
33-
"regions": ["ap-southeast-1"]
34-
},
35-
{
36-
"provider": "GCP",
37-
"regions": ["asia-northeast1"]
38-
}
39-
],
4030
"redisStackPreview": [
4131
{
4232
"provider": "AWS",
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { MigrationInterface, QueryRunner } from "typeorm";
2+
3+
export class AiHistory1718260230164 implements MigrationInterface {
4+
name = 'AiHistory1718260230164'
5+
6+
public async up(queryRunner: QueryRunner): Promise<void> {
7+
await queryRunner.query(`DROP INDEX "IDX_51d5d60bfc249e9a20443376e1"`);
8+
await queryRunner.query(`DROP INDEX "IDX_f0a6e0873ac71f323e9880b4a8"`);
9+
await queryRunner.query(`DROP INDEX "IDX_5c051504f4efe6f20c5a7f64f6"`);
10+
await queryRunner.query(`CREATE TABLE "temporary_ai_query_message" ("id" varchar PRIMARY KEY NOT NULL, "databaseId" varchar NOT NULL, "accountId" varchar NOT NULL, "type" varchar NOT NULL, "content" blob NOT NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "encryption" varchar, "steps" blob, "conversationId" varchar)`);
11+
await queryRunner.query(`INSERT INTO "temporary_ai_query_message"("id", "databaseId", "accountId", "type", "content", "createdAt", "encryption", "steps") SELECT "id", "databaseId", "accountId", "type", "content", "createdAt", "encryption", "steps" FROM "ai_query_message"`);
12+
await queryRunner.query(`DROP TABLE "ai_query_message"`);
13+
await queryRunner.query(`ALTER TABLE "temporary_ai_query_message" RENAME TO "ai_query_message"`);
14+
await queryRunner.query(`CREATE INDEX "IDX_51d5d60bfc249e9a20443376e1" ON "ai_query_message" ("databaseId") `);
15+
await queryRunner.query(`CREATE INDEX "IDX_f0a6e0873ac71f323e9880b4a8" ON "ai_query_message" ("accountId") `);
16+
await queryRunner.query(`CREATE INDEX "IDX_5c051504f4efe6f20c5a7f64f6" ON "ai_query_message" ("createdAt") `);
17+
}
18+
19+
public async down(queryRunner: QueryRunner): Promise<void> {
20+
await queryRunner.query(`DROP INDEX "IDX_5c051504f4efe6f20c5a7f64f6"`);
21+
await queryRunner.query(`DROP INDEX "IDX_f0a6e0873ac71f323e9880b4a8"`);
22+
await queryRunner.query(`DROP INDEX "IDX_51d5d60bfc249e9a20443376e1"`);
23+
await queryRunner.query(`ALTER TABLE "ai_query_message" RENAME TO "temporary_ai_query_message"`);
24+
await queryRunner.query(`CREATE TABLE "ai_query_message" ("id" varchar PRIMARY KEY NOT NULL, "databaseId" varchar NOT NULL, "accountId" varchar NOT NULL, "type" varchar NOT NULL, "content" blob NOT NULL, "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "encryption" varchar, "steps" blob)`);
25+
await queryRunner.query(`INSERT INTO "ai_query_message"("id", "databaseId", "accountId", "type", "content", "createdAt", "encryption", "steps") SELECT "id", "databaseId", "accountId", "type", "content", "createdAt", "encryption", "steps" FROM "temporary_ai_query_message"`);
26+
await queryRunner.query(`DROP TABLE "temporary_ai_query_message"`);
27+
await queryRunner.query(`CREATE INDEX "IDX_5c051504f4efe6f20c5a7f64f6" ON "ai_query_message" ("createdAt") `);
28+
await queryRunner.query(`CREATE INDEX "IDX_f0a6e0873ac71f323e9880b4a8" ON "ai_query_message" ("accountId") `);
29+
await queryRunner.query(`CREATE INDEX "IDX_51d5d60bfc249e9a20443376e1" ON "ai_query_message" ("databaseId") `);
30+
}
31+
32+
}

redisinsight/api/migration/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import { FeatureSso1691476419592 } from './1691476419592-feature-sso';
4141
import { AiHistory1713515657364 } from './1713515657364-ai-history';
4242
import { AiHistorySteps1714501203616 } from './1714501203616-ai-history-steps';
4343
import { Rdi1716370509836 } from './1716370509836-rdi';
44+
import { AiHistory1718260230164 } from './1718260230164-ai-history';
4445

4546
export default [
4647
initialMigration1614164490968,
@@ -86,4 +87,5 @@ export default [
8687
AiHistory1713515657364,
8788
AiHistorySteps1714501203616,
8889
Rdi1716370509836,
90+
AiHistory1718260230164,
8991
];

0 commit comments

Comments
 (0)