Skip to content

Commit 5c77c0f

Browse files
authored
Version 0.52.0
[feat] Hosting actions in arbitrary Docker Hub namespaces #1757 [feat] Dashboard: Add Link to Projects Overview #1885 [feat] Frontend: Add Option to Filter for new File Types #1835 [docs]: Add MCAP compression best practices guide [fix] Cannot Delete Project due to Foreign Key Constraint on Category #1884 [fix] [CLI]: List missions does not show # Files #1790 [fix] [CLI] Dangerous Behaviour When Deleting a Project Using Pattern Matching via CLI #1788 [fix] [CLI] Bug in Duplicate Name Check When Creating Projects via CLI #1787 [fix] [CLI] Ignore Tailing Spaces When Creating a Project Using the CLI #1786 [fix] Creating a mission with the top right button does not work #1739 [chore] Use a Single S3 Bucket for all FileTypes #1868 [chore] dependency updates
2 parents 622d17b + 23adb8c commit 5c77c0f

69 files changed

Lines changed: 2671 additions & 1860 deletions

File tree

Some content is hidden

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

.env

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ QUASAR_ENDPOINT=http://localhost:3000
44
FRONTEND_URL=http://localhost:8003
55
DOCS_URL=http://localhost:4000
66

7-
MINIO_USER=admin
8-
MINIO_PASSWORD=adminpassword11
7+
MINIO_USER=minioadmin
8+
MINIO_PASSWORD=minioadmin
99
MINIO_ACCESS_KEY=pMEKIOCnYJhmssiKZDGU
1010
MINIO_SECRET_KEY=ECnXGyUR5ZrPsxeD5JEWxtI1CMZFMJ8kTJMMAQ5B
11-
MINIO_BAG_BUCKET_NAME=bags
12-
MINIO_MCAP_BUCKET_NAME=mcaps
11+
MINIO_DATA_BUCKET_NAME=data
1312
MINIO_DB_BUCKET_NAME=dbdumps
1413
MINIO_ENDPOINT=localhost
1514

@@ -41,5 +40,6 @@ GOOGLE_ARTIFACT_UPLOADER_KEY_FILE=anymal-grand-tour-3b7a5d0c8ef4.json
4140
# can be left empty if you don't want to use docker hub
4241
DOCKER_HUB_USERNAME=
4342
DOCKER_HUB_PASSWORD=
43+
VITE_DOCKER_HUB_NAMESPACE=
4444

4545
ARTIFACTS_UPLOADER_IMAGE=rslethz/grandtour-datasets:artifact-uploader-latest

.github/workflows/check_version_number.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Checkout repository
1616
uses: actions/checkout@v5
1717

18-
- uses: actions/setup-node@v5
18+
- uses: actions/setup-node@v6
1919
with:
2020
node-version: '22'
2121
package-manager-cache: false

.github/workflows/create_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Checkout repository
1616
uses: actions/checkout@v5
1717

18-
- uses: actions/setup-node@v5
18+
- uses: actions/setup-node@v6
1919
with:
2020
node-version: '22'
2121
package-manager-cache: false

.github/workflows/draft-pdf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# This should be the path to the paper within your repo.
2020
paper-path: openjournals/paper.md
2121
- name: Upload
22-
uses: actions/upload-artifact@v4
22+
uses: actions/upload-artifact@v5
2323
with:
2424
name: paper
2525
# This is the output path where Pandoc will write the compiled

.github/workflows/eslint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v5
1515

1616
- name: Use Node.js
17-
uses: actions/setup-node@v5
17+
uses: actions/setup-node@v6
1818
with:
1919
node-version: '22'
2020
package-manager-cache: false

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v5
2222

2323
- name: Use Node.js
24-
uses: actions/setup-node@v5
24+
uses: actions/setup-node@v6
2525
with:
2626
node-version: '22'
2727
package-manager-cache: false

backend/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kleinkram-backend",
3-
"version": "0.51.0",
3+
"version": "0.52.0",
44
"description": "",
55
"author": "",
66
"private": true,
@@ -20,28 +20,28 @@
2020
"dependencies": {
2121
"@aws-sdk/client-sts": "3.726.1",
2222
"@google-cloud/local-auth": "^3.0.1",
23-
"@nestjs/common": "^10.4.7",
23+
"@nestjs/common": "^10.4.20",
2424
"@nestjs/config": "^4.0.2",
2525
"@nestjs/core": "^10.4.5",
26-
"@nestjs/jwt": "^11.0.0",
26+
"@nestjs/jwt": "^11.0.1",
2727
"@nestjs/mapped-types": "^2.0.5",
2828
"@nestjs/passport": "^11.0.5",
2929
"@nestjs/platform-express": "^10.4.20",
3030
"@nestjs/schedule": "^6.0.0",
3131
"@nestjs/swagger": "^8.0.1",
3232
"@nestjs/typeorm": "^10.0.2",
3333
"@opentelemetry/api": "^1.9.0",
34-
"@opentelemetry/exporter-prometheus": "^0.206.0",
35-
"@opentelemetry/exporter-trace-otlp-http": "^0.206.0",
36-
"@opentelemetry/instrumentation-express": "^0.55.0",
37-
"@opentelemetry/instrumentation-fetch": "^0.206.0",
38-
"@opentelemetry/instrumentation-http": "^0.206.0",
39-
"@opentelemetry/instrumentation-nestjs-core": "^0.53.0",
40-
"@opentelemetry/instrumentation-pg": "^0.59.0",
41-
"@opentelemetry/instrumentation-winston": "^0.51.0",
42-
"@opentelemetry/sdk-node": "^0.206.0",
34+
"@opentelemetry/exporter-prometheus": "^0.208.0",
35+
"@opentelemetry/exporter-trace-otlp-http": "^0.208.0",
36+
"@opentelemetry/instrumentation-express": "^0.57.0",
37+
"@opentelemetry/instrumentation-fetch": "^0.208.0",
38+
"@opentelemetry/instrumentation-http": "^0.208.0",
39+
"@opentelemetry/instrumentation-nestjs-core": "^0.55.0",
40+
"@opentelemetry/instrumentation-pg": "^0.61.0",
41+
"@opentelemetry/instrumentation-winston": "^0.53.0",
42+
"@opentelemetry/sdk-node": "^0.208.0",
4343
"@opentelemetry/sdk-trace-base": "^2.0.0",
44-
"@swc/core": "^1.13.3",
44+
"@swc/core": "^1.13.5",
4545
"@swc/jest": "^0.2.39",
4646
"@willsoto/nestjs-prometheus": "^6.0.1",
4747
"aws4": "^1.13.2",
@@ -52,7 +52,7 @@
5252
"cookie-parser": "^1.4.6",
5353
"date-fns": "^4.1.0",
5454
"form-data": "^4.0.4",
55-
"googleapis": "^148.0.0",
55+
"googleapis": "^165.0.0",
5656
"jsonwebtoken": "^9.0.2",
5757
"minio": "8.0.6",
5858
"multer": "^2.0.2",
@@ -77,24 +77,24 @@
7777
"@aws-sdk/client-s3": "3.726.1",
7878
"@jest/globals": "^30.2.0",
7979
"@nestjs/cli": "^11.0.10",
80-
"@nestjs/schematics": "^11.0.4",
80+
"@nestjs/schematics": "^11.0.9",
8181
"@nestjs/testing": "^10.0.0",
8282
"@types/cookie-parser": "^1.4.9",
8383
"@types/express": "^5.0.3",
8484
"@types/jest": "^29.5.2",
85-
"@types/node": "^24.0.7",
85+
"@types/node": "^24.9.1",
8686
"@types/supertest": "^6.0.3",
8787
"@types/passport-github": "^1.1.12",
8888
"@types/multer": "^2.0.0",
8989
"@types/passport-google-oauth20": "^2.0.16",
9090
"@typescript-eslint/eslint-plugin": "^8.32.1",
9191
"@typescript-eslint/parser": "^8.25.0",
92-
"eslint": "^9.36.0",
92+
"eslint": "^9.37.0",
9393
"eslint-config-prettier": "^10.1.8",
9494
"eslint-plugin-prettier": "^5.5.4",
9595
"jest": "^29.7.0",
9696
"jest-junit": "^16.0.0",
97-
"prettier": "^3.0.0",
97+
"prettier": "^3.6.2",
9898
"source-map-support": "^0.5.21",
9999
"supertest": "^7.1.4",
100100
"ts-jest": "^29.4.4",

backend/src/endpoints/auth/roles.guard.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,7 @@ export class WriteProjectGuard extends BaseGuard {
188188

189189
@Injectable()
190190
export class DeleteProjectGuard extends BaseGuard {
191-
constructor(
192-
private projectGuardService: ProjectGuardService,
193-
private reflector: Reflector,
194-
) {
191+
constructor(private projectGuardService: ProjectGuardService) {
195192
super();
196193
}
197194

backend/src/endpoints/file/file.controller.ts

Lines changed: 28 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { NoQueryParametersDto } from '@common/api/types/no-query-parameters.dto'
1010
import { StorageOverviewDto } from '@common/api/types/storage-overview.dto';
1111
import { UpdateFile } from '@common/api/types/update-file.dto';
1212
import env from '@common/environment';
13-
import { FileType } from '@common/frontend_shared/enum';
1413
import {
1514
Body,
1615
Controller,
@@ -30,7 +29,6 @@ import {
3029
QueryOptionalDate,
3130
QueryOptionalRecord,
3231
QueryOptionalString,
33-
QueryOptionalStringArray,
3432
QueryOptionalUUID,
3533
QuerySkip,
3634
QuerySortBy,
@@ -55,6 +53,8 @@ import {
5553

5654
import { CancelFileUploadDto } from '@common/api/types/cancel-file-upload.dto';
5755
import { FileQueryDto } from '@common/api/types/file/file-query.dto';
56+
import FileEntity from '@common/entities/file/file.entity';
57+
import { HealthStatus } from '@common/frontend_shared/enum';
5858

5959
@Controller(['file', 'files']) // TODO: migrate to 'files'
6060
export class FileController {
@@ -66,7 +66,10 @@ export class FileController {
6666
description: 'Many Files',
6767
type: FilesDto,
6868
})
69-
async getMany(@Query() query: FileQueryDto, @AddUser() auth: AuthHeader) {
69+
async getMany(
70+
@Query() query: FileQueryDto,
71+
@AddUser() auth: AuthHeader,
72+
): Promise<FilesDto> {
7073
return await this.fileService.findMany(
7174
query.projectUuids ?? [],
7275
query.projectPatterns ?? [],
@@ -110,20 +113,26 @@ export class FileController {
110113
topics: string,
111114
@QueryOptionalString(
112115
'fileTypes',
113-
"Filetypes: 'bag' | 'mcap' | 'bag,mcap' ",
116+
'File types to filter by (coma separated)',
114117
)
115118
fileTypes: string,
119+
@QueryOptionalString(
120+
'categories',
121+
'Categories to filter by (coma separated)',
122+
)
123+
categories: string,
116124
@QueryBoolean(
117-
'andOr',
125+
'matchAllTopics',
118126
'Returned File needs all specified topics (true) or any specified topics (false)',
119127
)
120-
andOr: boolean,
128+
matchAllTopics: boolean,
121129
@QueryOptionalRecord('tags', 'Dictionary Tagtype name to Tag value')
122130
tags: Record<string, any>,
123131
@QuerySkip('skip') skip: number,
124132
@QueryTake('take') take: number,
125133
@QuerySortBy('sort') sort: string,
126134
@QuerySortDirection('sortDirection') sortDirection: 'ASC' | 'DESC',
135+
@QueryOptionalString('health', 'File health') health: HealthStatus,
127136
@AddUser() auth: AuthHeader,
128137
): Promise<FilesDto> {
129138
let _missionUUID = missionUUID;
@@ -137,14 +146,16 @@ export class FileController {
137146
startDate,
138147
endDate,
139148
topics,
140-
andOr,
149+
categories,
150+
matchAllTopics,
141151
fileTypes,
142152
tags, // todo check if this is correct
143153
auth.user.uuid,
144154
Number.parseInt(String(take)), // TODO: fix
145155
Number.parseInt(String(skip)), // TODO: fix
146156
sort,
147157
sortDirection,
158+
health,
148159
);
149160
}
150161

@@ -158,7 +169,7 @@ export class FileController {
158169
'Whether the download link should stay valid for on week (false) or 4h (true)',
159170
)
160171
expires: boolean,
161-
) {
172+
): Promise<string> {
162173
logger.debug(`download ${uuid}: expires=${expires.toString()}`);
163174
return this.fileService.generateDownload(uuid, expires);
164175
}
@@ -176,45 +187,13 @@ export class FileController {
176187
return this.fileService.findOne(uuid);
177188
}
178189

179-
@Get('ofMission')
180-
@CanReadMission()
181-
@ApiOkResponse({
182-
description: 'Files of a Mission',
183-
type: FilesDto,
184-
})
185-
async getFilesOfMission(
186-
@QueryUUID('uuid', 'File UUID') uuid: string,
187-
@QuerySkip('skip') skip: number,
188-
@QueryTake('take') take: number,
189-
@QueryOptionalString('filename', 'Filename filter') filename: string,
190-
@QueryOptionalString('fileType', 'Filetype filter') fileType: string,
191-
@QueryOptionalStringArray(
192-
'categories',
193-
'Categories to filter by (logical OR)',
194-
)
195-
categories: string[],
196-
@QuerySortBy('sort') sort: string,
197-
@QuerySortDirection('sortDirection') sortDirection: 'ASC' | 'DESC',
198-
@QueryOptionalString('health', 'File health') health: string,
199-
): Promise<FilesDto> {
200-
return this.fileService.findByMission(
201-
uuid,
202-
Number.parseInt(String(take)), // TODO: fix
203-
Number.parseInt(String(skip)), // TODO: fix
204-
filename,
205-
// TODO: fix the following, it's ugly
206-
fileType === '' ? FileType.ALL : (fileType as FileType),
207-
categories,
208-
sort,
209-
sortDirection,
210-
health,
211-
);
212-
}
213-
214190
@Put(':uuid')
215191
@CanWriteFile()
216192
@OutputDto(null) // TODO: type API response
217-
async update(@ParameterUID('uuid') uuid: string, @Body() dto: UpdateFile) {
193+
async update(
194+
@ParameterUID('uuid') uuid: string,
195+
@Body() dto: UpdateFile,
196+
): Promise<FileEntity | null> {
218197
return this.fileService.update(uuid, dto);
219198
}
220199

@@ -225,7 +204,7 @@ export class FileController {
225204
@BodyUUIDArray('fileUUIDs', 'List of File UUID to be moved')
226205
fileUUIDs: string[],
227206
@BodyUUID('missionUUID', 'UUID of target Mission') missionUUID: string,
228-
) {
207+
): Promise<void> {
229208
return this.fileService.moveFiles(fileUUIDs, missionUUID);
230209
}
231210

@@ -235,7 +214,7 @@ export class FileController {
235214
async getOneFileByName(
236215
@QueryUUID('uuid', 'Mission UUID to search in') uuid: string,
237216
@QueryString('filename', 'Filename searched for') name: string,
238-
) {
217+
): Promise<FileEntity | null> {
239218
return this.fileService.findOneByName(uuid, name);
240219
}
241220

@@ -328,10 +307,9 @@ export class FileController {
328307
@ApiOkResponse({
329308
description: 'Resetting Minio tags completed',
330309
})
331-
async resetMinioTags() {
310+
async resetMinioTags(): Promise<void> {
332311
logger.debug('Resetting Minio tags');
333-
await this.fileService.renameTags(env.MINIO_BAG_BUCKET_NAME);
334-
await this.fileService.renameTags(env.MINIO_MCAP_BUCKET_NAME);
312+
await this.fileService.renameTags(env.MINIO_DATA_BUCKET_NAME);
335313
logger.debug('Resetting Minio tags done');
336314
}
337315

@@ -340,7 +318,7 @@ export class FileController {
340318
@ApiOkResponse({
341319
description: 'Recomputing file sizes completed',
342320
})
343-
async recomputeFileSizes() {
321+
async recomputeFileSizes(): Promise<void> {
344322
logger.debug('Recomputing file sizes');
345323
await this.fileService.recomputeFileSizes();
346324
logger.debug('Recomputing file sizes done');

backend/src/serialization.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,8 @@ export const missionEntityToDtoWithCreator = (
6262
export const missionEntityToFlatDto = (mission: Mission): FlatMissionDto => {
6363
return {
6464
...missionEntityToDtoWithCreator(mission),
65-
filesCount: mission.files?.length || 0,
66-
size:
67-
mission.files?.reduce(
68-
(accumulator, file) => accumulator + (file.size ?? 0),
69-
0,
70-
) || 0,
65+
filesCount: mission.fileCount ?? 0,
66+
size: mission.size ?? 0,
7167
};
7268
};
7369

0 commit comments

Comments
 (0)