Skip to content

Modernize runtime, fix API handling, and add device online metric - #60

Merged
kenfdev merged 1 commit into
masterfrom
maintenance/modernize-remo
Oct 3, 2026
Merged

kenfdev merged 1 commit into
masterfrom
maintenance/modernize-remo

Conversation

@kenfdev

@kenfdev kenfdev commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Why

Restore a maintained, testable exporter while preserving existing metrics and deployment targets. This addresses the dependency backlog in #30 and incorporates the fractional temperature-offset correction proposed by @hakonegi in #59, with regression tests.

Scope

  • Support Go 1.26/1.27, update dependencies, migrate tests to Ginkgo v2 and maintained GoMock.
  • Reject malformed device JSON, preserve fractional offsets, serialize per-endpoint cache refreshes, and bound HTTP requests to five seconds.
  • Add remo_device_online only when the API reports a known online/offline value. Keep existing metric names, labels, configuration, and Linux amd64/arm64/ARMv7 targets.
  • Replace publishing CI with build/test-only GitHub Actions. Make CircleCI inert and reject all CI calls to the manual publisher.
  • Fix the Alpine override, working-directory-dependent builds, Compose/Swarm secrets, obsolete Kubernetes Deployments, and usage docs.

Tradeoffs

Electricity history and new OAuth scopes are deferred. Prometheus examples stay on 2.55.1 as an interim major-version-preserving update, not a claim of upstream support. Each HTTP request has a timeout; the complete scrape does not have a separate deadline.

Blast radius

Existing device and smart-meter metric values remain unchanged. Source builds now require Go 1.26 or later. The online metric is additive and is absent for missing/null status.

Public CircleCI job metadata confirmed branch-specific configuration and checkout revisions before publication. The first branch revision included all publication guards. CircleCI job 1478 for this exact head succeeded with only the no-publication notice, without checkout or publishing steps. The legacy tag-only publisher invocation also fails before any Docker command; the script rejects CI even with its explicit publish flag. The old CircleCI test entrypoint also fails before its subsequent Codecov upload.

Verification

  • Passed race tests, vet, and Linux amd64/arm64/ARMv7 cross-builds with Go 1.26.8 and 1.27.1.
  • Reproduced decoding failures, an invalid-URL panic, duplicate concurrent fetches/data races, and missing online values before their fixes; corresponding regressions now pass.
  • Passed 100 repetitions of concurrent cache tests, eight packaging safety tests, module verification, and govulncheck with no findings after the update.
  • Passed real-binary smoke checks for every legacy metric, fractional offsets, online false/true/null/absent, Content-Type, and cached request counts.
  • Passed hosted amd64 Docker build and container smoke in GitHub Actions at head 8a217a9eaa4b0f25bac1b7b1e40dbf0c7deb8a29. Both push and PR runs passed Go 1.26/1.27 checks. Live Kubernetes and Nature hardware remain unverified. No real Nature token is used.

Preserve exporter contracts while updating the supported toolchain,
fixing API decoding and cache concurrency, and adding nullable online
status. Replace publishing CI with guarded build and test workflows.

Credit hakonegi's fractional temperature offset correction in #59.
@kenfdev
kenfdev marked this pull request as ready for review October 3, 2026 14:20
@kenfdev
kenfdev merged commit d5d2cd7 into master Oct 3, 2026
5 checks passed
@kenfdev
kenfdev deleted the maintenance/modernize-remo branch October 3, 2026 14:26
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.

1 participant