You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(deploy): hdb_deployment system table + audit record on every deploy
Slice A of #641. Every deploy_component call now writes a row to a new
system.hdb_deployment table capturing the project, package identifier,
sha256 of the payload tarball, payload size, status (pending → success
or failed), error info, and the upload payload itself as a Blob
attribute. The deployment_id is returned in the deploy response and is
the join key Studio/CLI will use to subscribe to live progress in
Slice B.
Includes:
- json/systemSchema.json: hdb_deployment table definition (deployment_id
hash, with attributes mirroring the lifecycle)
- utility/hdbTerms.ts: SYSTEM_TABLE_NAMES.DEPLOYMENT_TABLE_NAME +
LIST_DEPLOYMENTS / GET_DEPLOYMENT / GET_DEPLOYMENT_PAYLOAD /
DELETE_DEPLOYMENT_PAYLOAD operation enums
- upgrade/directives/5-2-0.ts: provisions the table on existing installs
(fresh installs get it via mount_hdb's systemSchema iteration)
- components/deploymentRecorder.ts: lifecycle wrapper used by
deployComponent — creates the row up front, ingests the payload into
a Blob attribute with sha256 + size, then commits success or failure
- components/deploymentOperations.ts: handlers for list_deployments
(with project/status/since/until/limit/offset filters) and
get_deployment; payload bytes are stripped from these responses
- components/operations.js: deployComponent now wraps prepareApplication
in a try/catch driven by the recorder; payload is re-sourced from
the persisted blob so extraction reads exactly what was recorded
- server/serverHelpers/serverUtilities.ts: registers the two new ops
- integrationTests/deploy/deploy-tracking.test.ts: end-to-end coverage
for the happy path, list filtering, and failure recording
Updates the brittle deepStrictEqual deploy-response assertions in 4
existing tests to allow the new deployment_id field. Slice A scope is
deliberately single-node; Slice B will replace the in-memory buffer in
ingestPayload with a streaming variant and add peer-side reads from
the replicated blob.
Refs #641
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@@ -361,7 +362,6 @@ async function deployComponent(req) {
361
362
}
362
363
363
364
// Write to root config if the request contains a package identifier
364
-
// TODO: how can we keep record of the `payload`? Its often too large to stuff into a config file; especially the root config. Maybe we can write it to a file and reference that way?
365
365
if(req.package){
366
366
// Check if trying to overwrite a core component (requires force)
367
367
// Lazy-load to avoid circular dependency with componentLoader
@@ -386,60 +386,89 @@ async function deployComponent(req) {
0 commit comments