Skip to content

Fix maintenance schedule mutation and day rollover bugs#590

Open
mikeshootzz wants to merge 2 commits intodevelopfrom
fix/maintenance-schedules
Open

Fix maintenance schedule mutation and day rollover bugs#590
mikeshootzz wants to merge 2 commits intodevelopfrom
fix/maintenance-schedules

Conversation

@mikeshootzz
Copy link
Contributor

@mikeshootzz mikeshootzz commented Feb 13, 2026

Summary

Fixes two bugs in maintenance schedule handling for services with PostgreSQL dependencies (Keycloak, Nextcloud):

  • Mutation bug: AddTime() used a pointer receiver, mutating the original TimeOfDay. This caused the parent service to also get the offset time.
  • Day rollover bug: When the 20-minute offset crossed midnight (e.g. 23:50 → 00:10), the day of week wasn't adjusted.

Replaces AddTime() with AddDuration() that returns a day offset, and moves the offset logic into SetCustomMaintenanceSchedule().

Checklist

  • Update tests.
  • Link this PR to related issues.
  • Merge with /merge comment.

Component PR: vshn/component-appcat#1072

@mikeshootzz mikeshootzz added bug Something isn't working patch labels Feb 13, 2026
This fixes mutation and maintenance scheduling on wrong days by
replacing AddTime() with AddDuration() and moving offset logic into
SetCustomMaintenanceSchedule
@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

This fixes an edge case with the rollover if the duration specified is
greater or equal than 24 hours
@github-actions
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant