Skip to content

Commit

Permalink
fc.agent maintenance reboots: warm -> cold is not significant
Browse files Browse the repository at this point in the history
@ctheune and I have decided that there is no good reason for making the
change of a warm to a cold reboot trigger a reschedule and customer
notification.

PL-133301
  • Loading branch information
osnyx committed Dec 21, 2024
1 parent df18bb1 commit 370d16e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
20 changes: 20 additions & 0 deletions changelog.d/20241221_120758_PL-133301-reboot-significance_scriv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!--
A new changelog entry.
Delete placeholder items that do not apply. Empty sections will be removed
automatically during release.
Leave the XX.XX as is: this is a placeholder and will be automatically filled
correctly during the release and helps when backporting over multiple platform
branches.
-->

### Impact



### NixOS XX.XX platform

- Changing a planned warm reboot to a cold reboot by merging does not trigger customer notifications and reschedule the maintenance window anymore. (PL-133301)
3 changes: 1 addition & 2 deletions pkgs/fc/agent/fc/maintenance/activity/reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def merge(self, other):
"merge-reboot-warm-to-cold",
help=(
"merging a cold reboot into a warm reboot results in a "
"cold reboot. This is a significant change."
"cold reboot."
),
)

Expand All @@ -73,6 +73,5 @@ def merge(self, other):
return ActivityMergeResult(
self,
is_effective=True,
is_significant=True,
changes={"before": RebootType.WARM, "after": RebootType.COLD},
)
4 changes: 2 additions & 2 deletions pkgs/fc/agent/fc/maintenance/activity/tests/test_reboot.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ def test_reboot_merge_warm_is_an_insignificant_update(warm):
assert not result.changes


def test_reboot_merge_cold_is_an_significant_update(warm, cold):
def test_reboot_merge_cold_is_an_insignificant_update(warm, cold):
original = warm
result = original.merge(cold)
assert result.merged is original
assert result.merged.reboot_needed == RebootType.COLD
assert result.is_effective is True
assert result.is_significant is True
assert result.is_significant is False
assert result.changes == {"before": "reboot", "after": "poweroff"}


Expand Down

0 comments on commit 370d16e

Please sign in to comment.