Skip to content

Fix get_cached_events() returning empty after rolling state restore#141

Open
koenvanderveen wants to merge 1 commit intomainfrom
koen/fix-nightlies
Open

Fix get_cached_events() returning empty after rolling state restore#141
koenvanderveen wants to merge 1 commit intomainfrom
koen/fix-nightlies

Conversation

@koenvanderveen
Copy link
Collaborator

Summary

  • pull_initial_state() restores from rolling state and incremental checkpoints into file_hashes and file_connection, but not events_messages_connection
  • get_cached_events() reads exclusively from events_messages_connection, so it returned [] after restoring from rolling state — causing test_google_drive_connection_load_state to fail in nightly integration tests
  • This was masked in unit tests because the mock drive service shares a filesystem directory between manager instances
  • Fix: after applying all restore sources, populate events_messages_connection from collected events if it's still empty

Test plan

  • Unit tests pass (184 passed, 1 skipped)
  • Integration test test_google_drive_connection_load_state should now pass in nightlies

…t restore

pull_initial_state() restores from rolling state and incremental checkpoints
into file_hashes and file_connection, but not events_messages_connection.
Since get_cached_events() reads exclusively from events_messages_connection,
it returned [] after restoring from rolling state.

This was masked in unit tests because the mock drive service shares a
filesystem directory between manager instances. In integration tests (real
GDrive, separate local directories), the cache was empty.

Fix: after applying all restore sources in pull_initial_state, populate
events_messages_connection from the collected events if it's still empty.
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

Comments