Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Stamp the binary's reported version: the git tag's semver on a
# tagged release, otherwise the Dockerfile's release default.
build-args: |
AGENT_VERSION=${{ startsWith(github.ref, 'refs/tags/') && steps.meta.outputs.version || '1.0.1' }}
# Keep the manifest list clean (one entry per arch, no "unknown/unknown"
# provenance entries that confuse some ARM runtimes / imagetools).
provenance: false
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

The Site Agent and central Overwatch are versioned independently.

## [Unreleased]
## [1.0.1] — 2026-07-12

### Fixed

- Restore the central-dispatched cache commands (status refresh, cache resync,
cache purge) that had been dropped in an earlier refactor, so operating an
agent from Overwatch works again.
- The agent no longer reports its version as `dev`. Every build path now stamps
the real release version — the standalone and monorepo Docker builds default
to it, both publish workflows stamp a clean SemVer, and an `AGENT_VERSION`
environment variable overrides the reported version on an already-built image
without a rebuild.
- Defensively bound an outgoing print-server frame's payload to `MaxPayload`, so
the length always fits the 32-bit header field (parity with central).

## [1.0.0] — 2026-07-11

Expand Down
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
# amd64/arm64/armv7 all build without QEMU — matches docker-image.yml, which
# sets up buildx only (no setup-qemu).
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS build
ARG AGENT_VERSION=dev
# Default to the current release so an un-tagged build (e.g. main -> :latest)
# still reports a real version, not "dev". Tagged releases override this via a
# build-arg (see docker-image.yml). Keep in sync with internal/version.Value.
ARG AGENT_VERSION=1.0.1
ARG TARGETOS TARGETARCH TARGETVARIANT
WORKDIR /src
COPY go.mod go.sum ./
Expand Down
11 changes: 9 additions & 2 deletions internal/ozoneproto/ozoneproto.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ const (
)

// Frame wraps a JSON payload in the 5-byte header: little-endian length + 0x28.
// Payloads are bounded by MaxPayload, so the length always fits the uint32 header
// field; an over-size payload (never expected in practice) is capped defensively
// rather than overflowing the length.
func Frame(payload []byte) []byte {
out := make([]byte, HeaderSize+len(payload))
binary.LittleEndian.PutUint32(out[:4], uint32(len(payload)))
if len(payload) > MaxPayload {
payload = payload[:MaxPayload]
}
n := len(payload) // 0 <= n <= MaxPayload, so it fits in uint32
out := make([]byte, HeaderSize+n)
binary.LittleEndian.PutUint32(out[:4], uint32(n))
out[4] = TokenByte
copy(out[HeaderSize:], payload)
return out
Expand Down
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ package version
// -ldflags "-X overwatch/agent/internal/version.Value=v1.2.3"
//
// or at runtime with the AGENT_VERSION environment variable.
var Value = "1.0.0"
var Value = "1.0.1"
Loading