Skip to content

Move runtime ownership into druid-cli#76

Open
MarcStdt wants to merge 15 commits into
masterfrom
feat/druid-k8s-runtime-owner
Open

Move runtime ownership into druid-cli#76
MarcStdt wants to merge 15 commits into
masterfrom
feat/druid-k8s-runtime-owner

Conversation

@MarcStdt
Copy link
Copy Markdown
Contributor

Summary

  • move runtime lifecycle, routing targets, and backup/restore execution into druid-cli runtime APIs
  • add druid-cli Helm chart and split management/public runtime routes
  • add CLI-driven Docker and Kubernetes backend integration tests with CI wiring

Verification

  • make test
  • make validate-api
  • make build
  • make test-integration

@druid-infra
Copy link
Copy Markdown
Contributor

Error: This repo is not allowlisted for Atlantis.

MarcStdt added 10 commits May 25, 2026 02:17
- Introduced a new `namespace` field in the OpenAPI specification for runtime resources, applicable to Kubernetes backends.
- Updated the runtime supervisor and related services to handle the new namespace parameter during scroll creation and management.
- Enhanced error handling and logging in the runtime daemon for better observability.
- Refactored related tests to accommodate the namespace changes and ensure proper functionality.
…t settings

- Added UUID generation for runtime scroll IDs when omitted during creation, ensuring unique identifiers.
- Implemented a timeout for HTTP clients in the OpenAPI client to improve reliability.
- Updated OpenAPI specifications and related documentation to reflect changes in ID handling.
- Refactored error handling in the runtime supervisor to manage scroll creation more effectively.
- Enhanced tests to cover new functionality and ensure robustness in scroll management.
- Introduced a new `RuntimeWorkerCallbackConfig` structure to manage callback settings for the runtime daemon.
- Enhanced the `runRuntimeDaemon` function to load environment variables and configure worker callbacks dynamically.
- Added `openWorkerCallbackListener` function to handle TCP listener creation for worker callbacks.
- Updated the Docker backend to support worker callback defaults and URL generation after listener setup.
- Added unit tests for the new callback listener functionality and its integration with the runtime daemon.
- Added support for routing assignments in the runtime command structure, allowing for better management of network configurations.
- Introduced a new error type for non-retryable command errors, improving error handling in the queue manager and procedure launcher.
- Updated the Docker backend to utilize routing information during container creation and command execution.
- Enhanced unit tests to validate the new routing functionality and error handling improvements.
@MarcStdt MarcStdt force-pushed the feat/druid-k8s-runtime-owner branch from 5147438 to a1c9856 Compare May 25, 2026 00:23
Comment thread .docker/entrypoint.sh
fi

# Map envs to args (--cwd = scroll dir, --config = path to .druid.yaml)
if [ ! -z "${DRUID_JWKS_SERVER}" ];
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.docker/entrypoint.sh should manage all env specific configurations. envs should not be definied directly in the go code, (check how it was done before)

Comment thread api/dev.openapi.yaml
Comment on lines +26 to +90
/api/v1/files:
get:
operationId: getFile
tags: [files]
summary: Read a file from the runtime root
parameters:
- $ref: '#/components/parameters/FilePath'
responses:
'200':
description: File contents
content:
text/plain:
schema:
type: string
application/octet-stream:
schema:
type: string
format: binary
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
head:
operationId: headFile
tags: [files]
summary: Check if a runtime file exists
parameters:
- $ref: '#/components/parameters/FilePath'
responses:
'200':
description: File exists
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
put:
operationId: putFile
tags: [files]
summary: Write a file into the runtime root
parameters:
- $ref: '#/components/parameters/FilePath'
requestBody:
required: true
content:
text/plain:
schema:
type: string
application/octet-stream:
schema:
type: string
format: binary
responses:
'204':
description: File written
'400':
$ref: '#/components/responses/BadRequest'
options:
operationId: optionsFile
tags: [files]
summary: Return CORS/WebDAV file access options
parameters:
- $ref: '#/components/parameters/FilePath'
responses:
'204':
description: Options returned
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the builtin webdav server dont construct types or routes on your own!

"github.com/spf13/cobra"
)

var CommandCommand = &cobra.Command{
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do one command per file, also add this to the AGENTS.md, split up command.go

Short: "Inspect and attach to runtime procedures",
}

var ProcedureListCommand = &cobra.Command{
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here, split up commands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants