Skip to content

feat(PocketIC): PocketIC can recover from a state directory after being killed #5921

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

Merged
merged 22 commits into from
Jul 21, 2025

Conversation

mraszyk
Copy link
Contributor

@mraszyk mraszyk commented Jul 14, 2025

This PR makes PocketIC able to recover from a state directory after being killed:

  • the time is loaded from the latest state (checkpoint) instead of PocketIC metadata (which might not be updated due to a crash);
  • PocketIC metadata (topology) is eagerly stored on disk after every topology change (subnet creation);
  • the argument of the endpoint /instances/ takes an additional optional field allow_incomplete_state specifying if incomplete state (e.g., resulting from not deleting a PocketIC instance gracefully) is allowed.

Warning! Recent state changes might be lost if a PocketIC instance is not stopped properly.

@github-actions github-actions bot added the feat label Jul 14, 2025
@mraszyk mraszyk marked this pull request as ready for review July 14, 2025 10:56
@mraszyk mraszyk requested a review from a team as a code owner July 14, 2025 10:56
@mraszyk mraszyk marked this pull request as draft July 14, 2025 11:38
@mraszyk mraszyk marked this pull request as ready for review July 14, 2025 14:47
@mraszyk mraszyk added this pull request to the merge queue Jul 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 21, 2025
@mraszyk mraszyk added this pull request to the merge queue Jul 21, 2025
Merged via the queue into master with commit d7e8c8b Jul 21, 2025
31 checks passed
@mraszyk mraszyk deleted the mraszyk/pic-load-time-from-latest-state branch July 21, 2025 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants