Skip to content

Commit 7ac697b

Browse files
authored
Merge pull request #1958 from line/dev
release: 8.2533.99
2 parents b158637 + bab596f commit 7ac697b

File tree

25 files changed

+1882
-1719
lines changed

25 files changed

+1882
-1719
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
lint:
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v5
2727

2828
- name: Setup
2929
uses: ./tooling/github/setup
@@ -34,7 +34,7 @@ jobs:
3434
format:
3535
runs-on: ubuntu-latest
3636
steps:
37-
- uses: actions/checkout@v4
37+
- uses: actions/checkout@v5
3838

3939
- name: Setup
4040
uses: ./tooling/github/setup
@@ -45,7 +45,7 @@ jobs:
4545
typecheck:
4646
runs-on: ubuntu-latest
4747
steps:
48-
- uses: actions/checkout@v4
48+
- uses: actions/checkout@v5
4949

5050
- name: Setup
5151
uses: ./tooling/github/setup
@@ -56,7 +56,7 @@ jobs:
5656
runs-on: ubuntu-latest
5757

5858
steps:
59-
- uses: actions/checkout@v4
59+
- uses: actions/checkout@v5
6060

6161
- name: Setup
6262
uses: ./tooling/github/setup

.github/workflows/docker-dev-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout repo
13-
uses: actions/checkout@v4
13+
uses: actions/checkout@v5
1414

1515
- name: Docker meta
1616
id: api-meta
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ubuntu-latest
4444
steps:
4545
- name: Checkout repo
46-
uses: actions/checkout@v4
46+
uses: actions/checkout@v5
4747

4848
- name: Docker meta
4949
id: web-meta

.github/workflows/docker-prod-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout repo
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616

1717
- name: Docker meta
1818
id: api-meta
@@ -45,7 +45,7 @@ jobs:
4545
runs-on: ubuntu-latest
4646
steps:
4747
- name: Checkout repo
48-
uses: actions/checkout@v4
48+
uses: actions/checkout@v5
4949

5050
- name: Docker meta
5151
id: web-meta

apps/api/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@
2626
},
2727
"prettier": "@ufb/prettier-config",
2828
"dependencies": {
29-
"@aws-sdk/client-s3": "^3.859.0",
30-
"@aws-sdk/s3-request-presigner": "^3.859.0",
29+
"@aws-sdk/client-s3": "^3.864.0",
30+
"@aws-sdk/s3-request-presigner": "^3.864.0",
3131
"@fastify/multipart": "^9.0.3",
3232
"@fastify/static": "^8.2.0",
3333
"@nestjs-modules/mailer": "^2.0.2",
3434
"@nestjs/axios": "^4.0.1",
35-
"@nestjs/common": "^11.1.5",
35+
"@nestjs/common": "^11.1.6",
3636
"@nestjs/config": "^4.0.2",
37-
"@nestjs/core": "^11.1.5",
37+
"@nestjs/core": "^11.1.6",
3838
"@nestjs/event-emitter": "^3.0.1",
3939
"@nestjs/jwt": "^11.0.0",
4040
"@nestjs/passport": "^11.0.5",
41-
"@nestjs/platform-express": "^11.1.5",
42-
"@nestjs/platform-fastify": "^11.1.5",
41+
"@nestjs/platform-express": "^11.1.6",
42+
"@nestjs/platform-fastify": "^11.1.6",
4343
"@nestjs/schedule": "^6.0.0",
4444
"@nestjs/swagger": "^11.2.0",
4545
"@nestjs/terminus": "^11.0.0",
@@ -85,7 +85,7 @@
8585
"@faker-js/faker": "^9.9.0",
8686
"@nestjs/cli": "^11.0.10",
8787
"@nestjs/schematics": "^11.0.7",
88-
"@nestjs/testing": "^11.1.5",
88+
"@nestjs/testing": "^11.1.6",
8989
"@swc-node/jest": "^1.8.13",
9090
"@swc/cli": "0.7.8",
9191
"@swc/core": "^1.4.16",
@@ -98,7 +98,7 @@
9898
"@types/nodemailer": "^6.4.17",
9999
"@types/passport-jwt": "*",
100100
"@types/supertest": "^6.0.3",
101-
"@typescript-eslint/parser": "^8.39.0",
101+
"@typescript-eslint/parser": "^8.39.1",
102102
"@ufb/eslint-config": "workspace:*",
103103
"@ufb/prettier-config": "workspace:*",
104104
"@ufb/tsconfig": "workspace:*",

apps/api/src/common/repositories/opensearch.repository.ts

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,12 +217,23 @@ export class OpensearchRepository {
217217
}
218218

219219
async updateData({ id, index, data }: UpdateDataDto) {
220-
await this.opensearchClient.update({
221-
id,
222-
index,
223-
body: { doc: data },
224-
refresh: true,
225-
});
220+
try {
221+
await this.opensearchClient.update({
222+
id,
223+
index,
224+
body: { doc: data },
225+
refresh: true,
226+
retry_on_conflict: 5,
227+
});
228+
} catch (error) {
229+
this.logger.error(`Error updating data: ${error}`);
230+
if (error?.meta?.body) {
231+
this.logger.error(
232+
`OpenSearch error details: ${JSON.stringify(error.meta.body, null, 2)}`,
233+
);
234+
}
235+
throw error;
236+
}
226237
}
227238

228239
async deleteBulkData({ ids, index }: DeleteBulkDataDto) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Copyright 2025 LY Corporation
3+
*
4+
* LY Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
import type { MigrationInterface, QueryRunner } from 'typeorm';
17+
18+
export class ChangeTemperatureDefaultValue1754965389371
19+
implements MigrationInterface
20+
{
21+
name = 'ChangeTemperatureDefaultValue1754965389371';
22+
23+
public async up(queryRunner: QueryRunner): Promise<void> {
24+
await queryRunner.query(
25+
`ALTER TABLE \`ai_field_templates\`
26+
MODIFY COLUMN \`temperature\` float NOT NULL DEFAULT 0.5`,
27+
);
28+
await queryRunner.query(
29+
`ALTER TABLE \`ai_issue_templates\`
30+
MODIFY COLUMN \`temperature\` float NOT NULL DEFAULT 0.5`,
31+
);
32+
}
33+
34+
public async down(queryRunner: QueryRunner): Promise<void> {
35+
await queryRunner.query(
36+
`ALTER TABLE \`ai_field_templates\`
37+
MODIFY COLUMN \`temperature\` float NOT NULL DEFAULT 0.7`,
38+
);
39+
await queryRunner.query(
40+
`ALTER TABLE \`ai_issue_templates\`
41+
MODIFY COLUMN \`temperature\` float NOT NULL DEFAULT 0.7`,
42+
);
43+
}
44+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/**
2+
* Copyright 2025 LY Corporation
3+
*
4+
* LY Corporation licenses this file to you under the Apache License,
5+
* version 2.0 (the "License"); you may not use this file except in compliance
6+
* with the License. You may obtain a copy of the License at:
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
* License for the specific language governing permissions and limitations
14+
* under the License.
15+
*/
16+
import type { MigrationInterface, QueryRunner } from 'typeorm';
17+
18+
export class ChangePromptToMediumText1755068715431
19+
implements MigrationInterface
20+
{
21+
name = 'ChangePromptToMediumText1755068715431';
22+
23+
public async up(queryRunner: QueryRunner): Promise<void> {
24+
await queryRunner.query(
25+
`ALTER TABLE \`ai_field_templates\`
26+
MODIFY COLUMN \`prompt\` mediumtext NOT NULL`,
27+
);
28+
await queryRunner.query(
29+
`ALTER TABLE \`ai_integrations\`
30+
MODIFY COLUMN \`system_prompt\` mediumtext NOT NULL`,
31+
);
32+
await queryRunner.query(
33+
`ALTER TABLE \`ai_issue_templates\`
34+
MODIFY COLUMN \`prompt\` mediumtext NOT NULL`,
35+
);
36+
}
37+
38+
public async down(queryRunner: QueryRunner): Promise<void> {
39+
await queryRunner.query(
40+
`ALTER TABLE \`ai_field_templates\`
41+
MODIFY COLUMN \`prompt\` text NOT NULL`,
42+
);
43+
await queryRunner.query(
44+
`ALTER TABLE \`ai_integrations\`
45+
MODIFY COLUMN \`system_prompt\` text NOT NULL`,
46+
);
47+
await queryRunner.query(
48+
`ALTER TABLE \`ai_issue_templates\`
49+
MODIFY COLUMN \`prompt\` text NOT NULL`,
50+
);
51+
}
52+
}

apps/api/src/domains/admin/project/ai/ai-field-templates.entity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ export class AIFieldTemplatesEntity extends CommonEntity {
2424
@Column('varchar', { default: '' })
2525
title: string;
2626

27-
@Column('varchar')
27+
@Column('mediumtext')
2828
prompt: string;
2929

3030
@Column('varchar')
3131
model: string | null;
3232

33-
@Column('float', { default: 0.7 })
33+
@Column('float', { default: 0.5 })
3434
temperature: number;
3535

3636
@ManyToOne(() => ProjectEntity, (project) => project.aiFieldTemplates, {

apps/api/src/domains/admin/project/ai/ai-integrations.entity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class AIIntegrationsEntity extends CommonEntity {
3030
@Column('varchar', { default: '' })
3131
endpointUrl: string;
3232

33-
@Column('text')
33+
@Column('mediumtext')
3434
systemPrompt: string;
3535

3636
@Column('int', { nullable: true, default: null })

apps/api/src/domains/admin/project/ai/ai-issue-templates.entity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export class AIIssueTemplatesEntity extends CommonEntity {
2929
@Column('json', { nullable: false, default: [] })
3030
targetFieldKeys: string[];
3131

32-
@Column('varchar')
32+
@Column('mediumtext')
3333
prompt: string;
3434

3535
@Column('boolean', { default: true })
@@ -38,7 +38,7 @@ export class AIIssueTemplatesEntity extends CommonEntity {
3838
@Column('varchar')
3939
model: string | null;
4040

41-
@Column('float', { default: 0.7 })
41+
@Column('float', { default: 0.5 })
4242
temperature: number;
4343

4444
@Column('int', { default: 3 })

0 commit comments

Comments
 (0)