Skip to content

Commit 0519375

Browse files
authored
(EAI-140): Rename directories to match package names (#257)
* rename + move packages * update CI/CD + build scripts * update release confs * update package names in docs * fix version mismatch * update lock file
1 parent 905c23b commit 0519375

File tree

357 files changed

+24497
-23639
lines changed

Some content is hidden

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

357 files changed

+24497
-23639
lines changed

.drone.yml

+39-38
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ trigger:
88
- tag
99
paths:
1010
include:
11-
- chat-server/**/*
12-
- chat-core/**/*
13-
- chat-ui/**/*
14-
- ingest/**/*
15-
- scripts/**/*
16-
- ingest-mongodb-public/**/*
17-
- chatbot-server-mongodb-public/**/*
11+
- packages/mongodb-chatbot-server/**/*
12+
- packages/mongodb-rag-core/**/*
13+
- packages/mongodb-chatbot-ui/**/*
14+
- packages/mongodb-rag-ingest/**/*
15+
- packages/scripts/**/*
16+
- packages/ingest-mongodb-public/**/*
17+
- packages/chatbot-server-mongodb-public/**/*
1818
- package-lock.json
1919

2020
steps:
@@ -71,10 +71,10 @@ trigger:
7171

7272
paths:
7373
include:
74-
- chat-server/**/*
75-
- chatbot-server-mongodb-public/**/*
76-
- chat-core/**/*
77-
- chat-ui/**/*
74+
- packages/mongodb-chatbot-server/**/*
75+
- packages/chatbot-server-mongodb-public/**/*
76+
- packages/mongodb-rag-core/**/*
77+
- packages/mongodb-chatbot-ui/**/*
7878

7979
steps:
8080
# Builds and publishes Docker image for staging
@@ -124,10 +124,10 @@ trigger:
124124
- staging
125125
paths:
126126
include:
127-
- chat-server/**/*
128-
- chatbot-server-mongodb-public/**/*
129-
- chat-core/**/*
130-
- chat-ui/**/*
127+
- packages/mongodb-chatbot-server/**/*
128+
- packages/chatbot-server-mongodb-public/**/*
129+
- packages/mongodb-rag-core/**/*
130+
- packages/mongodb-chatbot-ui/**/*
131131
branch:
132132
- main
133133

@@ -142,7 +142,8 @@ steps:
142142
namespace: docs
143143
release: chat-server-staging
144144
values: image.tag=git-${DRONE_COMMIT_SHA:0:7}-staging,image.repository=795250896452.dkr.ecr.us-east-1.amazonaws.com/docs/${DRONE_REPO_NAME}-chat-server,ingress.enabled=true,ingress.hosts[0]=chat-server.docs.staging.corp.mongodb.com
145-
values_files: ["chatbot-server-mongodb-public/environments/staging.yml"]
145+
values_files:
146+
["packages/chatbot-server-mongodb-public/environments/staging.yml"]
146147
api_server: https://api.staging.corp.mongodb.com
147148
kubernetes_token:
148149
from_secret: staging_kubernetes_token
@@ -220,7 +221,7 @@ steps:
220221
namespace: docs
221222
release: chat-server-qa
222223
values: image.tag=git-${DRONE_COMMIT_SHA:0:7}-qa,image.repository=795250896452.dkr.ecr.us-east-1.amazonaws.com/docs/${DRONE_REPO_NAME}-chat-server,ingress.enabled=true,ingress.hosts[0]=chat-qa.docs.staging.corp.mongodb.com
223-
values_files: ["chat-server/environments/qa.yml"]
224+
values_files: ["packages/mongodb-chatbot-server/environments/qa.yml"]
224225
api_server: https://api.staging.corp.mongodb.com
225226
kubernetes_token:
226227
from_secret: staging_kubernetes_token
@@ -299,7 +300,7 @@ steps:
299300
release: docs-chat
300301
values: image.tag=git-${DRONE_COMMIT_SHA:0:7}-production,image.repository=795250896452.dkr.ecr.us-east-1.amazonaws.com/docs/${DRONE_REPO_NAME}-chat-server,ingress.enabled=true,ingress.hosts[0]=chat-server.docs.prod.corp.mongodb.com
301302
values_files:
302-
["chatbot-server-mongodb-public/environments/production.yml"]
303+
["packages/chatbot-server-mongodb-public/environments/production.yml"]
303304
api_server: https://api.prod.corp.mongodb.com
304305
kubernetes_token:
305306
from_secret: prod_kubernetes_token
@@ -320,9 +321,9 @@ trigger:
320321
- push
321322
paths:
322323
include:
323-
- ingest/**/*
324-
- ingest-mongodb-public/**/*
325-
- chat-core/**/*
324+
- packages/mongodb-rag-ingest/**/*
325+
- packages/ingest-mongodb-public/**/*
326+
- packages/mongodb-rag-core/**/*
326327

327328
steps:
328329
# Builds and publishes Docker image for staging
@@ -371,9 +372,9 @@ trigger:
371372
- staging
372373
paths:
373374
include:
374-
- ingest/**/*
375-
- ingest-mongodb-public/**/*
376-
- chat-core/**/*
375+
- packages/mongodb-rag-ingest/**/*
376+
- packages/ingest-mongodb-public/**/*
377+
- packages/mongodb-rag-core/**/*
377378
branch:
378379
- main
379380

@@ -389,7 +390,7 @@ steps:
389390
release: ingest-service
390391
values: image.tag=git-${DRONE_COMMIT_SHA:0:7}-staging,image.repository=795250896452.dkr.ecr.us-east-1.amazonaws.com/docs/${DRONE_REPO_NAME}-ingest-service
391392
values_files:
392-
- ingest-mongodb-public/environments/staging.yml
393+
- packages/ingest-mongodb-public/environments/staging.yml
393394
api_server: https://api.staging.corp.mongodb.com
394395
kubernetes_token:
395396
from_secret: staging_kubernetes_token
@@ -467,7 +468,7 @@ steps:
467468
release: ingest-service
468469
values: image.tag=git-${DRONE_COMMIT_SHA:0:7}-production,image.repository=795250896452.dkr.ecr.us-east-1.amazonaws.com/docs/${DRONE_REPO_NAME}-ingest-service
469470
values_files:
470-
- ingest-mongodb-public/environments/production.yml
471+
- packages/ingest-mongodb-public/environments/production.yml
471472
api_server: https://api.prod.corp.mongodb.com
472473
kubernetes_token:
473474
from_secret: prod_kubernetes_token
@@ -495,7 +496,7 @@ steps:
495496
- npm install lerna
496497
- npm run bootstrap -- --scope mongodb-rag-core
497498
- npm run build -- --scope mongodb-rag-core
498-
- cd chat-core && npm publish
499+
- cd mongodb-rag-core && npm publish
499500
environment:
500501
LG_ARTIFACTORY_TOKEN:
501502
from_secret: lg_artifactory_token
@@ -527,7 +528,7 @@ steps:
527528
- npm install lerna
528529
- npm run bootstrap -- --scope='{mongodb-rag-core,mongodb-rag-ingest}'
529530
- npm run build -- --scope='{mongodb-rag-core,mongodb-rag-ingest}'
530-
- cd ingest && npm publish
531+
- cd packages/mongodb-rag-ingest && npm publish
531532
environment:
532533
LG_ARTIFACTORY_TOKEN:
533534
from_secret: lg_artifactory_token
@@ -558,7 +559,7 @@ steps:
558559
- npm install lerna
559560
- npm run bootstrap -- --scope='{mongodb-rag-core,mongodb-chatbot-server}'
560561
- npm run build -- --scope='{mongodb-rag-core,mongodb-chatbot-server}'
561-
- cd chat-server && npm publish
562+
- cd packages/mongodb-chatbot-server && npm publish
562563
environment:
563564
LG_ARTIFACTORY_TOKEN:
564565
from_secret: lg_artifactory_token
@@ -589,7 +590,7 @@ steps:
589590
- npm install lerna
590591
- npm run bootstrap -- --scope='{mongodb-rag-core,mongodb-chatbot-ui}'
591592
- npm run build -- --scope='{mongodb-rag-core,mongodb-chatbot-ui}'
592-
- cd chat-ui && npm publish
593+
- cd packages/mongodb-chatbot-ui && npm publish
593594
environment:
594595
LG_ARTIFACTORY_TOKEN:
595596
from_secret: lg_artifactory_token
@@ -613,9 +614,9 @@ trigger:
613614
- push
614615
paths:
615616
include:
616-
- scripts/**/*
617-
- chat-core/**/*
618-
- chat-server/**/*
617+
- packages/scripts/**/*
618+
- packages/mongodb-rag-core/**/*
619+
- packages/mongodb-chatbot-server/**/*
619620

620621
steps:
621622
# Builds and publishes Docker image for staging
@@ -664,9 +665,9 @@ trigger:
664665
- staging
665666
paths:
666667
include:
667-
- scripts/**/*
668-
- chat-core/**/*
669-
- chat-server/**/*
668+
- packages/scripts/**/*
669+
- packages/mongodb-rag-core/**/*
670+
- packages/mongodb-chatbot-server/**/*
670671
branch:
671672
- main
672673

@@ -682,7 +683,7 @@ steps:
682683
release: scripts-service
683684
values: image.tag=git-${DRONE_COMMIT_SHA:0:7}-staging,image.repository=795250896452.dkr.ecr.us-east-1.amazonaws.com/docs/${DRONE_REPO_NAME}-scripts-service
684685
values_files:
685-
- scripts/environments/staging.yml
686+
- packages/scripts/environments/staging.yml
686687
api_server: https://api.staging.corp.mongodb.com
687688
kubernetes_token:
688689
from_secret: staging_kubernetes_token
@@ -760,7 +761,7 @@ steps:
760761
release: scripts-service
761762
values: image.tag=git-${DRONE_COMMIT_SHA:0:7}-production,image.repository=795250896452.dkr.ecr.us-east-1.amazonaws.com/docs/${DRONE_REPO_NAME}-scripts-service
762763
values_files:
763-
- scripts/environments/production.yml
764+
- packages/scripts/environments/production.yml
764765
api_server: https://api.prod.corp.mongodb.com
765766
kubernetes_token:
766767
from_secret: prod_kubernetes_token

CONTRIBUTING.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ We use [Lerna](https://lerna.js.org/) to manage our monorepo.
1818

1919
The monorepo has the following main projects, each of which correspond to a JavaScript module:
2020

21-
- `chat-server`: Express.js server that performs chat functionality. RESTful API.
22-
- `ingest`: CLI application that takes data from data sources and converts it to `embedded_content`
21+
- `mongodb-chatbot-server`: Express.js server that performs chat functionality. RESTful API.
22+
- `mongodb-rag-ingest`: CLI application that takes data from data sources and converts it to `embedded_content`
2323
used by Atlas Vector Search.
24-
- `chat-ui`: React component for interfacing with the `chat-server`.
24+
- `chat-ui`: React component for interfacing with the `mongodb-chatbot-server`.
2525
Built with Leafygreen and vite.
26-
- `chat-core`: Common resources shared across other projects.
27-
- You need to recompile `chat-core` by running `npm run build`
26+
- `mongodb-rag-core`: Common resources shared across other projects.
27+
- You need to recompile `mongodb-rag-core` by running `npm run build`
2828
every time you update it for the changes to be accessible in the other projects
2929
that dependend on it.
3030
- `mongodb-atlas`: Collection of scripts related to managing the MongoDB Atlas deployment used by the project.
@@ -60,8 +60,8 @@ Before you begin setting up the project, ask a current project contributor for t
6060

6161
1. Artifactory credentials
6262
2. `.env` file variables for whichever projects you're working on.
63-
At a minimum, you'll need the `chat-core` environment variables, as the other
64-
projects depend on `chat-core`. If you're unsure which projects you need
63+
At a minimum, you'll need the `mongodb-rag-core` environment variables, as the other
64+
projects depend on `mongodb-rag-core`. If you're unsure which projects you need
6565
to work with, ask a current contributor.
6666

6767
### 2. Add Artifactory credentials
@@ -101,7 +101,7 @@ you need. You need to add the `.env` file to every project that you're working o
101101

102102
Refer to the each project's `README` files for information about running that project.
103103

104-
You can also run a development build of both the `chat-server` and `chat-ui`
104+
You can also run a development build of both the `mongodb-chatbot-server` and `chat-ui`
105105
with hot reload by running the following command from the root of the monorepo:
106106

107107
```sh
@@ -128,7 +128,7 @@ All packages' versioning is managed independently, which means that each package
128128

129129
We use [semantic versioning](https://semver.org/) to version packages.
130130

131-
Updating the version of a package is done as part of the release flow. Run the following command from a given package (e.g. `chat-server`):
131+
Updating the version of a package is done as part of the release flow. Run the following command from a given package (e.g. `mongodb-chatbot-server`):
132132

133133
```sh
134134
npm run release
@@ -143,7 +143,7 @@ that publishes the package to npm.
143143

144144
### Staging
145145

146-
We run a staging version of the `chat-server` and `ingest` that uses
146+
We run a staging version of the `mongodb-chatbot-server` and `mongodb-rag-ingest` that uses
147147
the latest commit on the `main` branch. When you merge new commits into `main`,
148148
a CI/CD pipeline automatically builds and publishes the updated staging server and demo site.
149149

@@ -186,7 +186,7 @@ builds and deploys the branch to the QA server.
186186
### Production Deployments
187187

188188
We use a tool called `release-it` to prepare production releases for the
189-
`chat-server`, `ingest`, and `chat-ui` projects.
189+
`mongodb-chatbot-server`, `mongodb-rag-ingest`, and `chat-ui` projects.
190190

191191
Production releases are triggered by creating a git tag prefaced with the
192192
package name (e.g. `chat-server-v{version-number}`).
@@ -199,7 +199,7 @@ To create a new production release:
199199
git pull upstream main
200200
```
201201

202-
2. In the relevant package directory (e.g `chat-server`) run the release
202+
2. In the relevant package directory (e.g `mongodb-chatbot-server`) run the release
203203
command. This gets the package ready for a new release.
204204

205205
```sh

chat-ui/.env.development

-2
This file was deleted.

chat-ui/.env.staging

-2
This file was deleted.

lerna.json

+1-11
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,5 @@
33
"useNx": true,
44
"useWorkspaces": true,
55
"version": "independent",
6-
"packages": [
7-
"chat-core",
8-
"chat-server",
9-
"chat-ui",
10-
"ingest",
11-
"chatbot-server-mongodb-public",
12-
"ingest-mongodb-public",
13-
"mongodb-atlas",
14-
"performance-tests",
15-
"scripts"
16-
]
6+
"packages": ["packages/*"]
177
}

0 commit comments

Comments
 (0)