Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fc.agent maintenance reboots: warm -> cold should not require to reschedule #1209

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading