Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/build-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ jobs:
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
core.exportVariable('ACTIONS_CACHE_SERVICE_V2', process.env.ACTIONS_CACHE_SERVICE_V2 || '');

- name: Build static sshd (Linux only)
if: runner.os == 'Linux'
run: |
bash scripts/build/build-static-sshd.sh dist
chmod +x dist/boxlite-sshd dist/boxlite-ssh-keygen
# Sanity check: verify static linking
file dist/boxlite-sshd | grep -q "statically linked" || \
{ echo "ERROR: boxlite-sshd is not statically linked" >&2; exit 1; }
echo "Built static sshd: $(file dist/boxlite-sshd)"

# Build guest on host BEFORE manylinux container because:
# - manylinux (AlmaLinux/RHEL) doesn't have musl packages in repos
# - Building musl-cross-make from source takes ~15 minutes
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,6 @@ regions-*.png
runners-*.png
term-*.png
test-*.png

.nx/cache
.nx/workspace-data
1 change: 1 addition & 0 deletions apps/api-client-go/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ model_create_region.go
model_create_region_response.go
model_create_runner.go
model_create_runner_response.go
model_create_ssh_access_body_dto.go
model_create_user.go
model_create_volume.go
model_health_controller_check_200_response.go
Expand Down
23 changes: 23 additions & 0 deletions apps/api-client-go/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2458,6 +2458,12 @@ paths:
schema:
type: number
style: form
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CreateSshAccessBodyDto"
required: false
responses:
"200":
content:
Expand Down Expand Up @@ -6751,6 +6757,16 @@ components:
- token
- url
type: object
CreateSshAccessBodyDto:
example:
unixUser: boxlite
properties:
unixUser:
description: Unix user for SSH access (camelCase form)
example: boxlite
pattern: "^([a-z_][a-z0-9_-]{0,31})?$"
type: string
type: object
SshAccessDto:
example:
id: 123e4567-e89b-12d3-a456-426614174000
Expand Down Expand Up @@ -6805,6 +6821,7 @@ components:
example:
valid: true
boxId: 123e4567-e89b-12d3-a456-426614174000
unixUser: boxlite
properties:
valid:
description: Whether the SSH access token is valid
Expand All @@ -6814,6 +6831,12 @@ components:
description: ID of the box this SSH access is for
example: 123e4567-e89b-12d3-a456-426614174000
type: string
unixUser:
description: Unix user for real-SSH access; null for legacy exec-bridge
tokens
example: boxlite
nullable: true
type: string
required:
- boxId
- valid
Expand Down
10 changes: 9 additions & 1 deletion apps/api-client-go/api_box.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

157 changes: 157 additions & 0 deletions apps/api-client-go/model_create_ssh_access_body_dto.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions apps/api-client-go/model_ssh_access_validation_dto.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions apps/api/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ export default {
// uuid v14 and nanoid v5 ship ESM-only. The nx preset ignores node_modules
// from transformation, so let ts-jest down-level them.
transformIgnorePatterns: ['/node_modules/(?!(?:uuid|nanoid)/)'],
moduleNameMapper: {
'@boxlite-ai/runner-api-client': '<rootDir>/../libs/runner-api-client/src/index.ts',
'@boxlite-ai/api-client': '<rootDir>/../libs/api-client/src/index.ts',
'@boxlite-ai/toolbox-api-client': '<rootDir>/../libs/toolbox-api-client/src/index.ts',
'@boxlite-ai/analytics-api-client': '<rootDir>/../libs/analytics-api-client/src/index.ts',
},
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/boxlite',
}
2 changes: 1 addition & 1 deletion apps/api/src/admin/controllers/box.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class AdminBoxController {
@Audit({
action: AuditAction.RECOVER,
targetType: AuditTarget.BOX,
targetIdFromRequest: (req) => req.params.boxId,
targetIdFromRequest: (req) => req.params.boxId as string,
targetIdFromResult: (result: BoxDto) => result?.id,
})
async recoverBox(@Param('boxId') boxId: string): Promise<BoxDto> {
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/admin/controllers/runner.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class AdminRunnerController {
@Audit({
action: AuditAction.UPDATE_SCHEDULING,
targetType: AuditTarget.RUNNER,
targetIdFromRequest: (req) => req.params.id,
targetIdFromRequest: (req) => req.params.id as string,
requestMetadata: {
body: (req: TypedRequest<{ unschedulable: boolean }>) => ({
unschedulable: req.body?.unschedulable,
Expand Down Expand Up @@ -179,7 +179,7 @@ export class AdminRunnerController {
@Audit({
action: AuditAction.DELETE,
targetType: AuditTarget.RUNNER,
targetIdFromRequest: (req) => req.params.id,
targetIdFromRequest: (req) => req.params.id as string,
})
async delete(@Param('id', ParseUUIDPipe) id: string): Promise<void> {
return this.runnerService.remove(id)
Expand Down
Loading
Loading