Align the source and production release versions

1877a03672c7 · AtlantisPleb · · parent 9be86efc5943

Align the source and production release versions

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

built
2 modules in 37.0 s
deployed
needs_rolling_replace · 2 modules on 0 nodes · push→live —

Changed files

  • modified docs/deploymodes.md
  • modified docs/operations/forge-hot-loop.md
  • modified mix.exs
  • modified rel/openagents.appup.exs
  • modified test/openagents/release/appup_test.exs

Diff

5 files changed, +23 -2

docs/deploymodes.md modified +7

@@ -194,6 +194,13 @@ The application version and source revision serve different purposes. A new

194 194
commit does not require a new application version when the direct path can
195 195
deploy it.
196 196
197
After a full release changes the application version, update the default in
198
`mix.exs` and the plain-release default in `rel/openagents.appup.exs` to the
199
same version. The Forge builder compiles the candidate application
200
specification from that source default, and each deployment node compares it
201
with its running release. Leaving the source default behind causes every later
202
direct candidate to fail with `runtime_toolchain_mismatch`.
203
197 204
## Receipts and status
198 205
199 206
`/status` and `/api/status` expose the active Forge lane, current target,
docs/operations/forge-hot-loop.md modified +6

@@ -138,6 +138,12 @@ next patch version only when a compatible full-release package needs a new

138 138
version. Reserve a minor-version change for a deliberate compatibility or
139 139
feature boundary.
140 140
141
When a full release changes the application version, commit the same default
142
version in `mix.exs` and `rel/openagents.appup.exs`. The sidecar reads that
143
source identity into its build manifest, and deployment nodes compare it with
144
the running application. If those versions drift, direct preparation fails
145
with `runtime_toolchain_mismatch` on every node.
146
141 147
If classification returns `needs_rolling_replace`, keep that receipt and use
142 148
this fallback order:
143 149
mix.exs modified +1 -1

@@ -51,7 +51,7 @@ defmodule OpenAgents.MixProject do

51 51
  end
52 52
53 53
  defp release_version do
54
    System.get_env("OPENAGENTS_RELEASE_VSN", "0.2.0")
54
    System.get_env("OPENAGENTS_RELEASE_VSN", "0.2.3")
55 55
  end
56 56
57 57
  # Hot-upgrade-capable release: castle/forecastle add appup + relup generation
rel/openagents.appup.exs modified +1 -1

@@ -40,7 +40,7 @@

40 40
       )
41 41
42 42
     is_nil(to) and is_nil(from) ->
43
       {String.to_charlist(System.get_env("OPENAGENTS_RELEASE_VSN", "0.2.0")), [], []}
43
       {String.to_charlist(System.get_env("OPENAGENTS_RELEASE_VSN", "0.2.3")), [], []}
44 44
45 45
     true ->
46 46
       raise "RELUP_FROM and RELUP_TO must be set together"
test/openagents/release/appup_test.exs modified +8

@@ -14,6 +14,7 @@ defmodule OpenAgents.Release.AppupTest do

14 14
15 15
  @appup_file Path.expand("../../../rel/openagents.appup.exs", __DIR__)
16 16
  @environment [
17
    "OPENAGENTS_RELEASE_VSN",
17 18
    "RELUP_FROM",
18 19
    "RELUP_TO",
19 20
    "RELUP_FROM_EBIN",

@@ -35,6 +36,13 @@ defmodule OpenAgents.Release.AppupTest do

35 36
    :ok
36 37
  end
37 38
39
  test "plain releases keep the appup and project versions aligned" do
40
    Enum.each(@environment, &System.delete_env/1)
41
42
    assert {String.to_charlist(Mix.Project.config()[:version]), [], []} ==
43
             @appup_file |> Code.eval_file() |> elem(0)
44
  end
45
38 46
  test "covers a changed module the fixed proof set never named" do
39 47
    from = ebin([widget(1), only_in_from()])
40 48
    to = ebin([widget(2), only_in_to()])

This page updates live while a promote is in flight · changelog