Skip to content

Commit 7c86728

Browse files
committed
feat: add storage adapter for hulylake
Signed-off-by: Alexander Onnikov <[email protected]>
1 parent c6828a4 commit 7c86728

File tree

56 files changed

+477
-292
lines changed

Some content is hidden

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

56 files changed

+477
-292
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 305 additions & 191 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

desktop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274
"electron-updater": "^6.3.4",
275275
"livekit-client": "^2.15.6",
276276
"@hcengineering/server-backup": "^0.7.0",
277-
"@hcengineering/communication-types": "^0.7.2",
277+
"@hcengineering/communication-types": "^0.7.3",
278278
"ws": "^8.18.2"
279279
},
280280
"productName": "Huly Desktop",

dev/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
STORAGE_CONFIG="datalake|http://huly.local:4030"
1+
STORAGE_CONFIG="hulylake|http://huly.local:8096"
22
MONGO_URL=mongodb://mongodb:27017?compressors=snappy
33
DB_URL_PG=postgresql://postgres:example@postgres:5432
44
BACKUP_STORAGE_CONFIG="minio|minio?accessKey=minioadmin&secretKey=minioadmin"

dev/doc-import-tool/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"@hcengineering/core": "^0.7.3",
5151
"@hcengineering/platform": "^0.7.3",
5252
"@hcengineering/server-core": "^0.7.0",
53-
"@hcengineering/server-storage": "^0.7.0",
53+
"@hcengineering/server-storage": "^0.7.1",
5454
"@hcengineering/server-token": "^0.7.0",
5555
"@hcengineering/server-tool": "^0.7.0",
5656
"@hcengineering/server-client": "^0.7.0",

dev/docker-compose.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,11 @@ services:
261261
- SERVER_SECRET=secret
262262
- ACCOUNTS_URL=http://huly.local:3000
263263
- STATS_URL=http://huly.local:4900
264-
- FILES_URL=http://huly.local:4030/blob/:workspace/:blobId/:filename
265-
- UPLOAD_URL=http://huly.local:4030/upload/form-data/:workspace
264+
# - FILES_URL=http://huly.local:4030/blob/:workspace/:blobId/:filename
265+
- UPLOAD_URL=/files
266+
# - UPLOAD_URL=http://huly.local:4030/upload/form-data/:workspace
266267
- PREVIEW_URL=http://huly.local:4040
267-
- PREVIEW_CONFIG=image|http://huly.local:4030/image/fit=cover,width=:width,height=:height,dpr=:dpr/:workspace/:blobId;video|http://huly.local:4030/meta/:workspace/:blobId
268+
# - PREVIEW_CONFIG=image|http://huly.local:4030/image/fit=cover,width=:width,height=:height,dpr=:dpr/:workspace/:blobId;video|http://huly.local:4030/meta/:workspace/:blobId
268269
- GMAIL_URL=http://huly.local:8093
269270
- CALENDAR_URL=http://huly.local:8095
270271
- TELEGRAM_URL=http://huly.local:8086

dev/prod/public/config-dev.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"PUBLIC_SCHEDULE_URL": "https://schedule.hc.engineering",
1313
"CALDAV_SERVER_URL": "https://caldav.hc.engineering",
1414
"BACKUP_URL": "https://front.hc.engineering/api/backup",
15+
"HULYLAKE_URL": "https://lake.hc.engineering",
1516
"PULSE_URL": "wss://pulse.hc.engineering/ws",
1617
"COMMUNICATION_API_ENABLED": "true",
1718
"FILES_URL": "https://datalake.hc.engineering/blob/:workspace/:blobId/:filename"

dev/tool/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"@hcengineering/server-collaboration-resources": "^0.7.0",
103103
"@hcengineering/server-backup": "^0.7.0",
104104
"@hcengineering/backup-service": "^0.7.0",
105-
"@hcengineering/server-storage": "^0.7.0",
105+
"@hcengineering/server-storage": "^0.7.1",
106106
"@hcengineering/server-calendar": "^0.7.0",
107107
"@hcengineering/server-calendar-resources": "^0.7.0",
108108
"@hcengineering/server-card": "^0.7.0",
@@ -182,7 +182,7 @@
182182
"@hcengineering/kafka": "^0.7.0",
183183
"@hcengineering/api-client": "^0.7.3",
184184
"@faker-js/faker": "^8.4.1",
185-
"@hcengineering/hulylake-client": "^0.7.3",
186-
"@hcengineering/communication-types": "^0.7.2"
185+
"@hcengineering/hulylake-client": "^0.7.4",
186+
"@hcengineering/communication-types": "^0.7.3"
187187
}
188188
}

dev/tool/src/communication.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// limitations under the License.
1313

1414
import { type Workspace } from '@hcengineering/account'
15-
import { type HulylakeClient, type JsonPatch } from '@hcengineering/hulylake-client'
15+
import { type HulylakeWorkspaceClient, type JsonPatch } from '@hcengineering/hulylake-client'
1616
import type postgres from 'postgres'
1717
import {
1818
generateUuid,
@@ -60,7 +60,7 @@ export async function migrateWorkspaceMessages (
6060
ws: Workspace,
6161
card: CardID | undefined,
6262
db: postgres.Sql,
63-
hulylake: HulylakeClient,
63+
hulylake: HulylakeWorkspaceClient,
6464
accountClient: AccountClient,
6565
personUuidBySocialId: Map<PersonId, PersonUuid>
6666
): Promise<void> {
@@ -72,7 +72,7 @@ async function migrateMessages (
7272
ws: Workspace,
7373
card: CardID | undefined,
7474
db: postgres.Sql,
75-
hulylake: HulylakeClient,
75+
hulylake: HulylakeWorkspaceClient,
7676
accountClient: AccountClient,
7777
personUuidBySocialId: Map<PersonId, PersonUuid>
7878
): Promise<void> {
@@ -105,7 +105,7 @@ async function migrateMessages (
105105
async function migrateMessagesBatch (
106106
ctx: MeasureContext,
107107
cardId: CardID,
108-
hulylake: HulylakeClient,
108+
hulylake: HulylakeWorkspaceClient,
109109
accountClient: AccountClient,
110110
personUuidBySocialId: Map<PersonId, PersonUuid>,
111111
messages: OldMessage[]
@@ -161,7 +161,11 @@ async function migrateMessagesBatch (
161161
}
162162
}
163163

164-
async function getGroups (ctx: MeasureContext, hulylake: HulylakeClient, cardId: CardID): Promise<MessagesGroup[]> {
164+
async function getGroups (
165+
ctx: MeasureContext,
166+
hulylake: HulylakeWorkspaceClient,
167+
cardId: CardID
168+
): Promise<MessagesGroup[]> {
165169
const res = await hulylake.getJson<MessagesGroupsDoc>(`${cardId}/messages/groups`, {
166170
maxRetries: 3,
167171
isRetryable: () => true,

dev/tool/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ import {
5656
type Account as OldAccount,
5757
type Workspace as OldWorkspace
5858
} from '@hcengineering/account-service'
59-
import { getClient as getHulylakeClient } from '@hcengineering/hulylake-client'
59+
import { getWorkspaceClient as getHulylakeClient } from '@hcengineering/hulylake-client'
6060
import {
6161
getDBClient,
6262
createPostgreeDestroyAdapter,

models/communication/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@hcengineering/card": "^0.7.0",
3838
"@hcengineering/communication": "^0.7.0",
3939
"@hcengineering/communication-resources": "^0.7.0",
40-
"@hcengineering/communication-types": "^0.7.2",
40+
"@hcengineering/communication-types": "^0.7.3",
4141
"@hcengineering/contact": "^0.7.0",
4242
"@hcengineering/core": "^0.7.3",
4343
"@hcengineering/model": "^0.7.3",

0 commit comments

Comments
 (0)