Update channels: stable at 20:00 UTC, Nightly checks every 30 minutes
The daily promotion moves to 20:00 UTC (21:00 in Paris in winter time): PROMOTE_AT and promote.yml's cron (20:07, retries until 21:37), with the docs that give the time. A launcher left open on Nightly looks for new releases every 30 minutes; Stable keeps 4 hours. The launcher README's Settings screenshot shows the Updates choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
name: promote
|
||||
# Beta game releases become stable once a day (docs/release-flow.md, "Channels"): at 19:00 UTC (21:00 in Paris in
|
||||
# summer time, 20:00 in winter) tools/release_channels.py promotes the newest beta that had been out 6 hours by then,
|
||||
# Beta game releases become stable once a day (docs/release-flow.md, "Channels"): at 20:00 UTC (21:00 in Paris in
|
||||
# winter time, 22:00 in summer) tools/release_channels.py promotes the newest beta that had been out 6 hours by then,
|
||||
# passed its release smoke test and isn't covered by an issue labelled release-blocker. Launchers on the Nightly
|
||||
# channel install every beta when it is published; Stable gets the day's promotion. The later runs of the evening are
|
||||
# retries for a run GitHub starts late or skips: they promote the same beta, so stable still moves once.
|
||||
# By hand, from GitHub's app too (Actions > promote > Run workflow):
|
||||
# gh workflow run promote -f tag=v0.2.3 # that beta now, without waiting for 19:00
|
||||
# gh workflow run promote -f tag=v0.2.3 # that beta now, without waiting for 20:00
|
||||
# gh workflow run promote -f tag=v0.2.3 -f force=true # even blocked or without its smoke test
|
||||
# gh workflow run promote -f dry_run=true # say what would be promoted
|
||||
# Holding betas back: label an issue release-blocker. While it is open it holds every beta; closed as completed it
|
||||
@@ -14,7 +14,7 @@ name: promote
|
||||
# has stalled" says so; it closes itself after the next promotion.
|
||||
on:
|
||||
schedule:
|
||||
- cron: '7,37 19-20 * * *'
|
||||
- cron: '7,37 20-21 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
|
||||
@@ -103,7 +103,7 @@ flowchart LR
|
||||
end
|
||||
build --> publish["publish vX.Y.Z as a beta<br/>notes from the merged PRs"]
|
||||
publish --> beta(["launchers on Nightly install it"])
|
||||
publish --> promote{"promote.yml, daily at 19:00 UTC:<br/>6 h old by then, smoke test, no release-blocker"}
|
||||
publish --> promote{"promote.yml, daily at 20:00 UTC:<br/>6 h old by then, smoke test, no release-blocker"}
|
||||
promote --> stable["stable and latest<br/>notes since the last stable"]
|
||||
stable --> launcher(["every launcher and server installs it"])
|
||||
stable --> kira(["Kira posts it;<br/>pings only with ### New"])
|
||||
@@ -191,17 +191,17 @@ Every game release is published as a **beta**, a GitHub pre-release, so GitHub's
|
||||
|
||||
- **Stable**, the default: a tested build about once a day, the betas promoted below.
|
||||
- **Nightly**: every beta as soon as it is built, many times a day; it can break. "Nightly" is a name, not a
|
||||
schedule. Launchers from before 0.2 had a "Beta builds" switch instead; on, it reads as Nightly.
|
||||
schedule. An open launcher looks for releases every 30 minutes on Nightly (4 hours on Stable). Launchers from before 0.2 had a "Beta builds" switch instead; on, it reads as Nightly.
|
||||
|
||||
`horizon-server update` installs stable builds (`--version <beta>` takes one by name), and Kira announces a release
|
||||
when it becomes stable: Discord's #releases only ever shows stable ones.
|
||||
|
||||
`.github/workflows/promote.yml` runs `tools/release_channels.py promote` once a day at 19:00 UTC (21:00 in Paris in
|
||||
summer time, 20:00 in winter), with retries until 20:37 for a run GitHub starts late or skips. It promotes the newest
|
||||
`.github/workflows/promote.yml` runs `tools/release_channels.py promote` once a day at 20:00 UTC (21:00 in Paris in
|
||||
winter time, 22:00 in summer), with retries until 21:37 for a run GitHub starts late or skips. It promotes the newest
|
||||
beta that
|
||||
|
||||
- is newer than the stable release,
|
||||
- had been out 6 hours at 19:00 UTC (published by 13:00 UTC that day; one published later waits for the next day),
|
||||
- had been out 6 hours at 20:00 UTC (published by 14:00 UTC that day; one published later waits for the next day),
|
||||
so every run of the evening picks the same beta and stable moves once a day,
|
||||
- passed its release smoke test: the macOS build attaches `smoke-test.json` (the offscreen game run's report) only
|
||||
when the game drew a world on the Mac mini, so a release built while `MAC_RUNNER` sends macOS to GitHub waits
|
||||
@@ -224,7 +224,7 @@ release (`release_train.py notes --stable`), so players who skipped the betas se
|
||||
betas. By hand, from a phone too (GitHub app: Actions, promote, Run workflow):
|
||||
|
||||
```sh
|
||||
gh workflow run promote -f tag=v0.2.3 # that beta now: no wait for 19:00, still no blocker
|
||||
gh workflow run promote -f tag=v0.2.3 # that beta now: no wait for 20:00, still no blocker
|
||||
gh workflow run promote -f tag=v0.2.3 -f force=true # even blocked or without a smoke test
|
||||
gh workflow run promote -f dry_run=true # what would be promoted now
|
||||
```
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ and some are waiting for Ludovic:
|
||||
the only `verify` a change can have is one that ran. Main requires it, from GitHub Actions only, for everyone,
|
||||
admins included.
|
||||
- **Beta, then stable.** Every release is first a **beta**. It becomes **stable**, the version launchers and
|
||||
servers install by themselves, in the daily promotion (19:00 UTC), only after it has been out 6 hours and passed its
|
||||
servers install by themselves, in the daily promotion (20:00 UTC), only after it has been out 6 hours and passed its
|
||||
smoke test (the game started and drew a world on the Mac mini), and only while no issue labelled `release-blocker`
|
||||
is open. If a beta misses a promotion it was due for, an issue says so. Players who want the newest builds at once
|
||||
pick **Nightly** under Updates in the launcher's Settings. Discord announces stable releases only.
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ game and the launcher of the 0.2 line.
|
||||
and launcher counted separately (the game releases more often, so `v0.2.14` can go with `launcher@0.2.3`).
|
||||
- **Betas** are not separate tags. As before, every game release is published as a GitHub pre-release (a beta, what
|
||||
the launcher's Nightly channel installs) under its final tag and promoted in place to stable in the daily
|
||||
promotion at 19:00 UTC, once it has been out 6 hours ([Channels](release-flow.md#channels)). `v0.2.4` is the same
|
||||
promotion at 20:00 UTC, once it has been out 6 hours ([Channels](release-flow.md#channels)). `v0.2.4` is the same
|
||||
build whether it is still a beta or already stable.
|
||||
- **Pre-release tags** (`v0.3.0-rc.1`, `v0.3.0-beta.2`) are semver's and are reserved for a hand-made preview of a
|
||||
new line; the train never makes them. Every reader orders them before their release and after the release
|
||||
@@ -137,7 +137,7 @@ Run by the orchestrator, in this order. Until step 3, nothing is published.
|
||||
# with launcher-v0.17.0's binary: update --check --json -> "launcher": "0.2.0", "horizon": "v0.2.0" (with Beta builds on)
|
||||
```
|
||||
and `gh release view v0.2.0 --json assets`, `horizon-server --version` in the Linux server archive.
|
||||
7. `v0.2.0` becomes stable in the first daily promotion (19:00 UTC) it has been out 6 hours for (or
|
||||
7. `v0.2.0` becomes stable in the first daily promotion (20:00 UTC) it has been out 6 hours for (or
|
||||
`gh workflow run promote -f tag=v0.2.0`). While it is a beta, *latest*
|
||||
stays the bridge, so keeping it in beta for longer catches more servers (Ludovic's call). From then on everything
|
||||
is automatic again: `v0.2.1`, `launcher@0.2.1`, ….
|
||||
|
||||
+2
-1
@@ -84,7 +84,8 @@ page `servers.json` (the list), `servers/<name>/` (the servers created there) an
|
||||
and update state.
|
||||
- **Updates**: **Stable** (the default) installs a tested build about once a day, the betas that
|
||||
`promote.yml` makes stable; **Nightly** installs every release as soon as it is built, several
|
||||
times a day, and can break (docs/release-flow.md, "Channels"). Kept as `update_channel` in
|
||||
times a day, and can break (docs/release-flow.md, "Channels"). While it is open, the launcher
|
||||
looks for new releases every 4 hours on Stable and every 30 minutes on Nightly. Kept as `update_channel` in
|
||||
`settings.json`; a `beta_builds: true` from launchers before 0.2 reads as Nightly.
|
||||
`horizon-launcher update-channel [stable|nightly]` shows or sets it. The **Versions** page
|
||||
shows each release's channel. The launcher's own updates don't depend on it.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 94 KiB |
@@ -395,6 +395,15 @@ impl UpdateChannel {
|
||||
self == UpdateChannel::Nightly || !release.beta
|
||||
}
|
||||
|
||||
/// How often a launcher left open looks for new releases: Nightly's come many times a day,
|
||||
/// Stable's once.
|
||||
pub fn check_every(self) -> std::time::Duration {
|
||||
std::time::Duration::from_secs(match self {
|
||||
UpdateChannel::Stable => 4 * 3600,
|
||||
UpdateChannel::Nightly => 30 * 60,
|
||||
})
|
||||
}
|
||||
|
||||
/// The channel a release is on when it is listed: betas are Nightly's only.
|
||||
pub fn of(release: &Release) -> Self {
|
||||
if release.beta {
|
||||
@@ -2466,6 +2475,10 @@ mod tests {
|
||||
for c in [UpdateChannel::Stable, UpdateChannel::Nightly] {
|
||||
assert_eq!(UpdateChannel::parse(c.name()), Some(c));
|
||||
}
|
||||
// An open launcher looks again every 4 hours on Stable, every 30 minutes on Nightly.
|
||||
let minutes = |c: UpdateChannel| c.check_every().as_secs() / 60;
|
||||
assert_eq!(minutes(UpdateChannel::Stable), 240);
|
||||
assert_eq!(minutes(UpdateChannel::Nightly), 30);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -92,9 +92,6 @@ fn ease_out_cubic(x: f32) -> f32 {
|
||||
horizon_theme::ease_out_cubic(x)
|
||||
}
|
||||
|
||||
/// How often the launcher looks for new releases while it is open.
|
||||
const CHECK_EVERY: Duration = Duration::from_secs(4 * 3600);
|
||||
|
||||
enum Load<T> {
|
||||
Loading,
|
||||
Ready(T),
|
||||
@@ -613,7 +610,8 @@ impl Launcher {
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
if self.checked.is_some_and(|at| at.elapsed() > CHECK_EVERY) {
|
||||
let every = self.settings.update_channel.check_every();
|
||||
if self.checked.is_some_and(|at| at.elapsed() > every) {
|
||||
self.check_updates();
|
||||
}
|
||||
if changed {
|
||||
|
||||
@@ -4,8 +4,8 @@ import unittest
|
||||
from tools import release_channels as channels
|
||||
from tools import release_train as train
|
||||
|
||||
# Just after the daily promotion (PROMOTE_AT, 19:00 UTC): a beta is due when it had been out 6 hours by 19:00.
|
||||
NOW = dt.datetime(2026, 10, 19, 19, 30, tzinfo=dt.timezone.utc)
|
||||
# Just after the daily promotion (PROMOTE_AT, 20:00 UTC): a beta is due when it had been out 6 hours by 20:00.
|
||||
NOW = dt.datetime(2026, 10, 19, 20, 30, tzinfo=dt.timezone.utc)
|
||||
|
||||
|
||||
def release(tag, hours_ago, prerelease=True, smoke=True, draft=False):
|
||||
@@ -31,18 +31,18 @@ class ReleaseChannelTests(unittest.TestCase):
|
||||
|
||||
def test_nothing_is_due_before_six_hours(self):
|
||||
chosen, why = channels.choose([STABLE, release("v2026.10.19", 6)], [], NOW)
|
||||
self.assertIsNone(chosen, "out 5 h 30 min at 19:00")
|
||||
self.assertIn("the one at 2026-10-20 19:00 UTC takes it", why)
|
||||
self.assertIsNone(chosen, "out 5 h 30 min at 20:00")
|
||||
self.assertIn("the one at 2026-10-20 20:00 UTC takes it", why)
|
||||
late = channels.choose([STABLE, release("v2026.10.19", 0.5)], [], NOW)[1]
|
||||
self.assertIn("the one at 2026-10-20 19:00 UTC takes it", late, "out after 19:00: 6 h by the next one")
|
||||
self.assertIn("the one at 2026-10-20 20:00 UTC takes it", late, "out after 20:00: 6 h by the next one")
|
||||
|
||||
def test_stable_moves_once_a_day_whenever_the_run_starts(self):
|
||||
hour = dt.timedelta(hours=1)
|
||||
releases = [STABLE, release("v2026.10.19", 9), release("v2026.10.19.01", 6)]
|
||||
# Before 19:00 nothing new is due, even what has been out 6 hours by now.
|
||||
# Before 20:00 nothing new is due, even what has been out 6 hours by now.
|
||||
before = channels.choose(releases, [], NOW - hour)
|
||||
self.assertIsNone(before[0], before[1])
|
||||
# The 19:00 run and a late one or a retry pick the same beta; once it is stable, the evening's later runs
|
||||
# The 20:00 run and a late one or a retry pick the same beta; once it is stable, the evening's later runs
|
||||
# promote nothing, though v2026.10.19.01 has been out 6 hours by then.
|
||||
for late in (0, 1, 3):
|
||||
self.assertEqual(channels.choose(releases, [], NOW + late * hour)[0]["tag_name"], "v2026.10.19")
|
||||
@@ -52,8 +52,8 @@ class ReleaseChannelTests(unittest.TestCase):
|
||||
self.assertEqual(channels.choose(releases, [], NOW + 20 * hour)[0]["tag_name"], "v2026.10.19")
|
||||
# The next day's promotion takes the one that came out too late for today's.
|
||||
self.assertEqual(channels.choose(promoted, [], NOW + 24 * hour)[0]["tag_name"], "v2026.10.19.01")
|
||||
self.assertEqual(channels.promotion_time(NOW), dt.datetime(2026, 10, 19, 19, 0, tzinfo=dt.timezone.utc))
|
||||
self.assertEqual(channels.promotion_time(NOW - hour), dt.datetime(2026, 10, 18, 19, 0, tzinfo=dt.timezone.utc))
|
||||
self.assertEqual(channels.promotion_time(NOW), dt.datetime(2026, 10, 19, 20, 0, tzinfo=dt.timezone.utc))
|
||||
self.assertEqual(channels.promotion_time(NOW - hour), dt.datetime(2026, 10, 18, 20, 0, tzinfo=dt.timezone.utc))
|
||||
|
||||
def test_a_beta_without_its_smoke_test_waits_for_a_hand(self):
|
||||
releases = [STABLE, release("v2026.10.19", 8, smoke=False)]
|
||||
@@ -120,7 +120,7 @@ class ReleaseChannelTests(unittest.TestCase):
|
||||
self.assertIsNone(channels.choose([bridge, launcher], [], NOW)[0], "launcher releases are never game betas")
|
||||
|
||||
def test_a_stall_is_reported_once_the_oldest_waiting_beta_missed_a_daily_promotion(self):
|
||||
# Out at 13:31 yesterday: just too late for yesterday's 19:00, so 29 h 59 min of waiting is a normal day.
|
||||
# Out at 14:31 yesterday: just too late for yesterday's 20:00, so 29 h 59 min of waiting is a normal day.
|
||||
self.assertIsNone(channels.stalled([STABLE, release("v2026.10.19", 29.99), release("v2026.10.19.01", 2)], NOW))
|
||||
releases = [STABLE, release("v2026.10.19", 31), release("v2026.10.19.01", 2)]
|
||||
oldest, age = channels.stalled(releases, NOW)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
python3 tools/release_channels.py promote --dry-run # say what would happen, change nothing
|
||||
|
||||
Every game release goes out as a beta (a GitHub pre-release): launchers on the Nightly channel install it at once.
|
||||
Stable moves once a day, at PROMOTE_AT (19:00 UTC). A beta is due for stable when:
|
||||
Stable moves once a day, at PROMOTE_AT (20:00 UTC). A beta is due for stable when:
|
||||
- it is newer than the stable release (GitHub's "latest", which launchers and servers install by default),
|
||||
- it had been out PROMOTE_AFTER (6 hours) at the day's promotion time, so every run until the next one picks the
|
||||
same beta and a run GitHub starts late (or a second try) never promotes twice; by hand (--tag) skips the wait,
|
||||
@@ -42,8 +42,8 @@ from tools.release_train import is_game_tag, tag_key # noqa: E402 (vYYYY.MM.DD
|
||||
|
||||
REPO = os.environ.get("GITHUB_REPOSITORY", "ludovic111/horizon")
|
||||
PROMOTE_AFTER = dt.timedelta(hours=6)
|
||||
# The daily promotion (21:00 in Paris in summer time, 20:00 in winter); promote.yml's schedule runs just after it.
|
||||
PROMOTE_AT = dt.time(19, 0)
|
||||
# The daily promotion (21:00 in Paris in winter time, 22:00 in summer); promote.yml's schedule runs just after it.
|
||||
PROMOTE_AT = dt.time(20, 0)
|
||||
SMOKE_ASSET = "smoke-test.json"
|
||||
BLOCKER = "release-blocker"
|
||||
STALL_AFTER = dt.timedelta(hours=30)
|
||||
|
||||
@@ -34,7 +34,7 @@ The game opens on Horizon's own title screen. Your worlds, options and logs live
|
||||
|
||||
## Updating
|
||||
|
||||
- **Horizon.** The launcher looks for a new release when it starts and every four hours while it is open. With **Install new versions automatically** on (the default), it installs one and moves you to it if you were on the newest. New releases come out many times a day, and old versions stay installed until you remove them on the **Versions** page.
|
||||
- **Horizon.** The launcher looks for a new release when it starts and, while it is open, every four hours (every 30 minutes on Nightly). With **Install new versions automatically** on (the default), it installs one and moves you to it if you were on the newest. New releases come out many times a day, and old versions stay installed until you remove them on the **Versions** page.
|
||||
- **The launcher.** It updates itself from its own releases, then shows **Restart** in its footer.
|
||||
|
||||
## Stable and Nightly
|
||||
@@ -42,9 +42,9 @@ The game opens on Horizon's own title screen. Your worlds, options and logs live
|
||||
In **Settings**, **Updates** picks which builds install by themselves:
|
||||
|
||||
- **Stable** (the default): a tested build about once a day.
|
||||
- **Nightly**: every change as soon as it is built, several times a day. It can break.
|
||||
- **Nightly**: every change as soon as it is built, several times a day. It can break. A launcher left open looks for new builds every 30 minutes.
|
||||
|
||||
Every new release is a Nightly build first. Once a day, the newest one that has been out for six hours, passed its smoke test and has no known blocker becomes Stable. "Nightly" is just the name: it updates many times a day, not once a night. The **Versions** page shows each version's channel, and you can install any of them by hand.
|
||||
Every new release is a Nightly build first. Once a day (20:00 UTC, 21:00 in Paris in winter), the newest one that has been out for six hours, passed its smoke test and has no known blocker becomes Stable. "Nightly" is just the name: it updates many times a day, not once a night. The **Versions** page shows each version's channel, and you can install any of them by hand.
|
||||
|
||||
## The Versions page
|
||||
|
||||
|
||||
Reference in New Issue
Block a user