Skip to content

Fix manual cron session rotation#126

Open
fallintoplace wants to merge 1 commit into
ClickHouse:mainfrom
fallintoplace:fix/manual-cron-rotation
Open

Fix manual cron session rotation#126
fallintoplace wants to merge 1 commit into
ClickHouse:mainfrom
fallintoplace:fix/manual-cron-rotation

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

Fixes the manual cron session rotation endpoint so it actually clears a persistent job's SDK session context.

Root cause

Manual rotation called _maybe_rotate_context(..., rotate_hours=0). That used to force rotation, but the context_rotate_at refactor made rotate_hours=0 mean "disabled" inside the shared helper, so the manual path returned rotated: false without clearing sdk_session_id.

Changes

  • Add an explicit force flag to the shared rotation helper.
  • Use force=True from rotate_session().
  • Add a regression test covering manual rotation when scheduled rotation is disabled.

Validation

  • python -m pytest tests/test_cron.py -q
  • python -m pytest tests/test_cron.py::TestRotationMemorize -q

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant