Skip to content

test(install): pin the grafana bind flag and the rollback restart - #384

Merged
CameronBrooks11 merged 2 commits into
mainfrom
test/install-pin-bind-flag-and-rollback-restart
Oct 16, 2026
Merged

CameronBrooks11 merged 2 commits into
mainfrom
test/install-pin-bind-flag-and-rollback-restart

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

test(install): pin the grafana bind flag and the rollback restart

Two orderings in install.sh had no test behind them.

  • _OBS_GRAFANA_BIND_APPLIED is set only after grafana-server restarts
    with the new drop-in (feat(install): bind grafana and influxdb to loopback by default #359). A new case in observability_test.bats
    fails that restart and expects the summary to say "Grafana bind
    unchanged" and to print neither address.
  • The rollback case where copying the saved manifest fails (fix(install): restore manifest.json on --rollback #354) never
    reached the restart, because no unit file existed. It now sources
    install.sh with SYSTEMD_DIR pointed at a temp dir that holds
    anolis-runtime.service, stubs systemctl and phase_health, and expects
    "systemctl restart anolis-runtime.service" after the warning and
    before "rollback complete".

install.sh is unchanged. With the flag assignment moved above the
grafana restart, the new observability case fails and no other does.
With the restart removed from do_rollback, the rollback case fails.
shellcheck tools/install.sh is clean and bats tests/shell/ passes 203
of 203.

Closes #364

Two orderings in install.sh had no test behind them.

- _OBS_GRAFANA_BIND_APPLIED is set only after grafana-server restarts
  with the new drop-in (#359). A new case in observability_test.bats
  fails that restart and expects the summary to say "Grafana bind
  unchanged" and to print neither address.
- The rollback case where copying the saved manifest fails (#354) never
  reached the restart, because no unit file existed. It now sources
  install.sh with SYSTEMD_DIR pointed at a temp dir that holds
  anolis-runtime.service, stubs systemctl and phase_health, and expects
  "systemctl restart anolis-runtime.service" after the warning and
  before "rollback complete".

install.sh is unchanged. With the flag assignment moved above the
grafana restart, the new observability case fails and no other does.
With the restart removed from do_rollback, the rollback case fails.
shellcheck tools/install.sh is clean and bats tests/shell/ passes 203
of 203.

Closes #364
@CameronBrooks11
CameronBrooks11 enabled auto-merge (squash) October 16, 2026 00:28
@CameronBrooks11
CameronBrooks11 merged commit 9cff975 into main Oct 16, 2026
26 checks passed
@CameronBrooks11
CameronBrooks11 deleted the test/install-pin-bind-flag-and-rollback-restart branch October 16, 2026 00:45
CameronBrooks11 added a commit that referenced this pull request Oct 16, 2026
Bumps `project(VERSION)` and `vcpkg.json` to 0.1.45 and rolls the
CHANGELOG. Ships, among others:
- `safety.on_startup`, default `safe_state`: the declared safe state
  runs once at every runtime start (#392, closes #362);
- Grafana and InfluxDB bound to loopback under `--with-observability`,
  with `--with-grafana-network` to open Grafana to the LAN (#359,
  closes #351);
- `install.sh` refuses a downgrade unless `--allow-downgrade` (#382,
  closes #366);
- the zero rung no longer sends a guessed boolean (#367), e-stop
  `safe_state_achieved` (#368), dispatchable coverage counts (#369),
  and startup warnings for fault-hook gaps (#370) and disarmed
  watchdogs (#371);
- `health.excluded_signals` (#377), signal unit and description in
  capabilities (#365);
- a half-open probe of an open provider circuit every 60 s, a restart
  that stops the old process first, and a restart clock that starts
  after it stops (#376, #391);
- automation status: `idle` outside AUTO, and `failed` cleared by a
  load or a new AUTO run (#373, #386);
- `install.sh`: provider liveness in the health phase (#355, #383),
  `manifest.json` restored on `--rollback` (#354), Grafana restarted
  on every observability run (#343), the datasource debug lines
  filtered from the journal (#360), and the uninstall prefix guard
  (#342);
- no ERROR lines for reads that fail during shutdown (#381).

The CHANGELOG opens 0.1.45 with upgrade notes: Grafana is on loopback
by default, `safety.on_startup` drives outputs at boot by default, and
downgrades need `--allow-downgrade`. The 0.1.44 note about restarting
grafana-server by hand is not repeated, since #343 restarts it on
every run.

The OpenAPI changes are additive: `SignalSpec.unit` and
`.description`, `EstopResponse.safe_state_achieved`,
`ParameterDefinition.source` and the runtime status
`startup_safe_state`. No provider-protocol change. anolis-workbench
vendors the OpenAPI file and needs a repin to this release.

Every commit in `git log v0.1.44..main` is in the CHANGELOG except
CI, test-only and docs-lint commits (#380, #384, #389).

After merge, tag `v0.1.45`.
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.

install.sh bats: pin the grafana bind flag order and the rollback restart

1 participant