Skip to content

Commit 1053108

Browse files
authored
Merge pull request #257 from cloudera/main
Release 1.23.0
2 parents 5ae8135 + 405ce6e commit 1053108

File tree

88 files changed

+3303
-4221
lines changed

Some content is hidden

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

88 files changed

+3303
-4221
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# prebuilt_artifacts/* filter=lfs diff=lfs merge=lfs -text

.github/workflows/publish_release.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ on:
2020
- customer-hotfix
2121
jobs:
2222
build:
23-
2423
runs-on: ubuntu-latest
2524

2625
steps:
@@ -29,6 +28,13 @@ jobs:
2928
with:
3029
ref: ${{ github.event.inputs.BRANCH }}
3130
ssh-key: ${{ secrets.DEPLOY_KEY }}
31+
lfs: true
32+
33+
- name: Install Git LFS
34+
run: |
35+
sudo apt-get update && sudo apt-get install git-lfs
36+
- name: Initialize Git LFS
37+
run: git lfs install
3238

3339
- name: Set up JDK 21
3440
uses: actions/setup-java@v4
@@ -102,14 +108,18 @@ jobs:
102108
run: |
103109
git config --local user.name actions-user
104110
git config --local user.email "[email protected]"
105-
echo "export RELEASE_TAG=${{ github.event.inputs.VERSION }}" > release_version.txt
106-
git add release_version.txt
111+
echo "export RELEASE_TAG=${{ github.event.inputs.VERSION }}" > scripts/release_version.txt
112+
mkdir -p prebuilt_artifacts
113+
cp backend/build/libs/rag-api.jar prebuilt_artifacts/
114+
cp ui/fe-dist.tar.gz prebuilt_artifacts/
115+
cp ui/express/node-dist.tar.gz prebuilt_artifacts/
116+
git add prebuilt_artifacts
117+
git add scripts/release_version.txt
107118
if ! git diff --cached --quiet; then
108119
git commit -m "Update release version to ${{ github.event.inputs.VERSION }}"
109120
git push
110121
else
111122
echo "No changes to commit"
112123
fi
113-
working-directory: scripts
114124
env:
115-
GITHUB_TOKEN: ${{ github.token }}
125+
GITHUB_TOKEN: ${{ github.token }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: publish_runtime.yml
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
VERSION:
6+
description: 'Version of runtime to release'
7+
required: true
8+
BRANCH:
9+
description: 'Branch to use for runtime build'
10+
required: true
11+
default: 'main'
12+
type: choice
13+
options:
14+
- main
15+
- mob/main
16+
- release/1
17+
- customer-hotfix
18+
jobs:
19+
runtime-build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.event.inputs.BRANCH }}
26+
ssh-key: ${{ secrets.DEPLOY_KEY }}
27+
lfs: true
28+
29+
- name: Login to GitHub Container Registry
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Build Docker image
37+
run: |
38+
docker build -t ghcr.io/cloudera/rag-studio-runtime:${{ github.event.inputs.VERSION }} -t ghcr.io/cloudera/rag-studio-runtime:latest -f runtime.Dockerfile .
39+
docker push ghcr.io/cloudera/rag-studio-runtime:${{ github.event.inputs.VERSION }}
40+
docker push ghcr.io/cloudera/rag-studio-runtime:latest
41+
working-directory: llm-service

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ databases/
1010
**/.DS_Store
1111
.history
1212
addresses/
13-
tools/
13+
tools/mcp.json

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@ the Node service locally, you can do so by following these steps:
150150
docker run -p 6333:6333 -p 6334:6334 -v $(pwd)/databases/qdrant_storage:/qdrant/storage:z qdrant/qdrant
151151
```
152152

153+
#### Modifying UI in CML
154+
155+
* This is an unsupported workflow, but it is possible to modify the UI code in CML.
156+
157+
- Start a CML Session from a CML Project that has the RAG Studio AMP installed.
158+
- Open the terminal in the CML Session and navigate to the `ui` directory.
159+
- Run `source ~/.bashrc` to ensure the Node environment variables are loaded.
160+
- Install PNPM using `npm install -g pnpm`. Docs on PNPM can be found here: https://pnpm.io/installation#using-npm
161+
- Run `pnpm install` to install the dependencies.
162+
- Make your changes to the UI code in the `ui` directory.
163+
- Run `pnpm build` to build the new UI bundle.
164+
153165
## The Fine Print
154166

155167
IMPORTANT: Please read the following before proceeding. This AMP includes or otherwise depends on certain third party software packages. Information about such third party software packages are made available in the notice file associated with this AMP. By configuring and launching this AMP, you will cause such third party software packages to be downloaded and installed into your environment, in some instances, from third parties' websites. For each third party software package, please see the notice file and the applicable websites for more information, including the applicable license terms. If you do not wish to download and install the third party software packages, do not configure, launch or otherwise use this AMP. By configuring, launching or otherwise using the AMP, you acknowledge the foregoing statement and agree that Cloudera is not responsible or liable in any way for the third party software packages.

backend/src/main/java/com/cloudera/cai/rag/projects/ProjectRepository.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,11 @@ public List<Project> getProjects(String username) {
123123
SELECT *
124124
FROM project
125125
WHERE created_by_id = :createdById
126-
OR default_project = true
126+
OR default_project = :default
127127
""";
128128
handle.registerRowMapper(ConstructorMapper.factory(Project.class));
129129
try (Query query = handle.createQuery(sql)) {
130-
query.bind("createdById", username);
130+
query.bind("createdById", username).bind("default", true);
131131
return query.mapTo(Project.class).list();
132132
}
133133
});
@@ -145,11 +145,12 @@ public Project getDefaultProject() {
145145
"""
146146
SELECT *
147147
FROM project
148-
WHERE default_project = true
148+
WHERE default_project = :default
149149
""";
150150
handle.registerRowMapper(ConstructorMapper.factory(Project.class));
151151
try (Query query = handle.createQuery(sql)) {
152152
return query
153+
.bind("default", true)
153154
.mapTo(Project.class)
154155
.findOne()
155156
.orElseThrow(() -> new NotFound("Default project not found"));

backend/src/main/resources/migrations/postgres/19_create_project.up.sql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@ BEGIN;
4040

4141
CREATE TABLE project
4242
(
43-
id BIGINT auto_increment NOT NULL,
43+
id SERIAL PRIMARY KEY,
4444
name VARCHAR(1024) NOT NULL,
4545
default_project BOOLEAN NOT NULL DEFAULT FALSE,
4646
time_created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
4747
time_updated TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
4848
created_by_id VARCHAR(255) NOT NULL,
49-
updated_by_id VARCHAR(255) NOT NULL,
50-
CONSTRAINT PK_project PRIMARY KEY (id)
49+
updated_by_id VARCHAR(255) NOT NULL
5150
);
5251

5352
COMMIT;

backend/src/main/resources/migrations/postgres/20_create_default_project.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838

3939
BEGIN;
4040

41-
INSERT INTO project (name, created_by_id, updated_by_id) VALUES ('Default', 'admin', 'admin');
41+
INSERT INTO project (name, DEFAULT_PROJECT, created_by_id, updated_by_id) VALUES ('Default', true,'admin', 'admin');
4242

4343
COMMIT;

backend/src/main/resources/migrations/postgres/23_create_project_data_source.up.sql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ BEGIN;
4040

4141
CREATE TABLE project_data_source
4242
(
43-
id BIGINT auto_increment NOT NULL,
43+
id SERIAL PRIMARY KEY,
4444
project_id BIGINT NOT NULL,
45-
data_source_id BIGINT NOT NULL,
46-
CONSTRAINT PK_project_ds PRIMARY KEY (id)
45+
data_source_id BIGINT NOT NULL
4746
);
4847

4948
COMMIT;

backend/src/main/resources/migrations/postgres/24_add_default_project_data_source.down.sql

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
* DATA.
3737
*/
3838

39-
SET MODE MYSQL;
40-
4139
BEGIN;
4240

4341
DELETE from project_data_source where project_id = (select id from project where default_project = true);

0 commit comments

Comments
 (0)