Skip to content

1.0.11

Choose a tag to compare

@github-actions github-actions released this 13 Jul 02:54
· 137 commits to master since this release

dc-agent 1.0.11

This release delivers the backend side of Commands management for the dc-operator console — list, details, and fully-typed create/edit over the control plane with write-only API keys — plus periodic agent-config backups on the operator, a mirror mode for zip-dirs, a local verification harness, and a git pull fix for non-SSH remotes. The bundled operator UI is updated to dc-agent-react v1.2.0.

Commands over the control plane

  • New command/list endpoint on the agent's control plane, with a matching operator API. Commands are discovered by scanning CONFIG_DIR for *.json / *.yml config files (the docker command dc-docker.* is excluded); the name comes from the file name, and the type is taken from an explicit type field or inferred from the present fields.
  • Command details now return all configuration parameters, with API keys masked to stable ids.
  • Create and edit are fully typed: one request DTO per command type (WAR, JAR, NODE, SAVE_ARTIFACT, ZIP_ARCHIVE, ZIP_DIRS, FETCH_URL, DOCKER), serialized from the finished config model — no hand-built JSON. API keys are write-only: the client sends masked ids to keep plus new secrets to add, and the agent merges them against the on-disk map. A server-side CommandValidator mirrors the UI validation rules.
  • Together these power the new Commands screens in the React console.

Agent config backups

  • The operator now periodically backs up every agent's config files over the control plane, archiving them locally — one subdirectory per agent, each backup a <agent>-yyyy-MM-dd-HH-mm-ss.zip. Unchanged snapshots are skipped via a stable content hash, only the last N archives are kept, and each run is logged to .last.txt.
  • New operator startup parameters: DC_AGENT_BACKUP_INTERVAL (ISO-8601 duration, default PT1H), DC_AGENT_BACKUP_DIR, and DC_AGENT_BACKUP_KEEP (default 5).

zip-dirs: mirror mode

  • New delete option (default false). With delete: true, the target directory exactly mirrors the uploaded archive: after extraction, every file under the resolved target dir that is not in the ZIP is removed, along with directories left empty. This is destructive by design — it applies to the whole resolved target dir — and is documented with an explicit caution in the docs.

Fixes

  • git pull no longer throws ClassCastException on non-SSH remotes. The publickey session factory is now applied only to SshTransport, so file:// and http(s) config-repo remotes work as expected.

Operator

  • New /info endpoint reporting the operator's build version from the jar manifest (Implementation-Version, set by the operator-shaded profile; falls back to dev when running unshaded). This powers the new version footer in the console.
  • Bundled UI pin bumped to dc-agent-react v1.2.0 (SHA-256 verified): Commands screens, renamed navigation (Applications / Agents / Services / Commands), reworked error handling, and the frontend/backend version footer.

Developer experience

  • New verify/ harness for a repeatable local run of the whole system — dc-agent, dc-operator, and the React UI wired together with test config — to manually verify the UI before cutting a release. Two frontend modes: separate (Rsbuild dev server on :3000 proxying the API) and bundled (UI baked into the operator jar, mirroring a real release).
  • New frontend-local Maven profile builds the operator with a locally built dc-agent-react dist instead of downloading the pinned GitHub release: ./mvnw -pl dc-agent-operator -am -Pfrontend-local,operator-shaded package.

Documentation

  • Documented the /app-status endpoint: guarded by its own bearer token (APP_STATUS_TOKEN, separate from the control-plane token), response fields (appInstanceName, appVersion, uptimeMs, …), and the match-all/host/{h}/instance/{i}/port/{p} variant that returns 412 on mismatch — handy as a load-balancer or deploy sanity check.
  • Documented the operator's agent/list endpoint that powers the dc-agent list screen, and updated the architecture page with the per-host token channels.

Full changelog: 1.0.10...1.0.11